Skip to content

Commit 037a020

Browse files
committed
Fix nested-map bug
1 parent ca43d7d commit 037a020

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

DOCS.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# WebUI v2.2.0 V APIs
2+
3+
* [Download and Install](#download-and-install)
4+
* Examples
5+
* Window
6+
* New Window
7+
* Show Window
8+
* Window status
9+
* Binding & Events
10+
* Bind
11+
* Events
12+
* Application
13+
* Wait
14+
* Exit
15+
* Close
16+
* Startup Timeput
17+
* Multi Access
18+
19+
## Download and Install
20+
21+
Install the VWebUI package from VPM (~ 800 Kb).
22+
23+
```sh
24+
v install malisipi.mui
25+
```
26+
27+
To see the VWebUI source code, please visit [VWebUI](https://github.com/malisipi/vwebui) in our GitHub repository.
28+
29+
## Examples
30+
31+
A minimal V example
32+
33+
```v
34+
import malisipi.vwebui as webui
35+
36+
mut my_window := webui.new_window()
37+
my_window.show("<html>Hello</html>")
38+
webui.wait()
39+
```
40+
41+
Please visit [V Examples](https://github.com/malisipi/vwebui/tree/main/examples) in our GitHub repository for more complete examples.

vwebui.v

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ pub fn (window Window) set_kiosk (kiosk bool) Window {
221221
fn native_event_handler(e &CEvent) {
222222
unsafe {
223223
bind_id := C.webui_interface_get_bind_id(e.window, e.element)
224-
resp := function_list[C.webui_interface_get_window_id(e.window)][bind_id](Event{
224+
win_id := C.webui_interface_get_window_id(e.window)
225+
func := function_list[win_id][bind_id]
226+
resp := func(Event{
225227
window: e.window,
226228
event_type: vwebui.event(e.event_type)
227229
element: e.element.vstring()

0 commit comments

Comments
 (0)