vlang / ui

A cross-platform UI library written in V

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples do not work at all

ceremcem opened this issue · comments

V version:


\ \ / / | Welcome to the V REPL (for help with V itself, type exit , then run v help ).
\ / / | Note: the REPL is highly experimental. For best V experience, use a text editor,
\ / | save your code in a main.v file and execute: v run main.v
\ / | V 0.4.3 976c5fb . Use list to see the accumulated program so far.
__/ | Use Ctrl-C or exit to exit, or help to see other available commands.

UI version: Latest commit at this time.
OS: Debian Bullseye.

What did you do?

I just run the example as stated in the Readme.

What did you expect to see?

I expected to see some running code.

What did you see instead?

I saw the following error :

/home/ceremcem/.vmodules/ui/src/draw_device_bitmap.v:14:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   12 | }
   13 | 
   14 | [params]
      | ^
   15 | pub struct DrawDeviceBitmapParams {
   16 |     id string = 'dd_bitmap'
/home/ceremcem/.vmodules/ui/src/draw_device_print.v:11:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
    9 | }
   10 | 
   11 | [params]
      | ^
   12 | pub struct DrawDevicePrintParams {
   13 |     id       string = 'dd_print'
/home/ceremcem/.vmodules/ui/src/draw_device_svg.v:15:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   13 | }
   14 | 
   15 | [params]
      | ^
   16 | struct DrawDeviceSVGParams {
   17 |     id string = 'dd_svg'
/home/ceremcem/.vmodules/ui/src/draw_device_svg.v:29:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   27 | 
   28 | // screenshot method for SVG device
   29 | [manualfree]
      | ^
   30 | pub fn (mut d DrawDeviceSVG) screenshot_window(filename string, mut w Window) {
   31 |     // println("svg device")
/home/ceremcem/.vmodules/ui/src/extra_size.v:79:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   77 | }
   78 | 
   79 | [unsafe]
      | ^
   80 | pub fn (c &CachedSizes) free() {
   81 |     unsafe {
/home/ceremcem/.vmodules/ui/src/extra_text_syntax.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   29 | type SyntaxMapRunes = map[string][]rune
   30 | 
   31 | [heap]
      | ^
   32 | struct SyntaxHighLighter {
   33 | mut:
/home/ceremcem/.vmodules/ui/src/interface_scrollable.v:369:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  367 | }
  368 | 
  369 | [heap]
      | ^
  370 | pub struct ScrollView {
  371 | pub mut:
/home/ceremcem/.vmodules/ui/src/interface_scrollable.v:443:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  441 | }
  442 | 
  443 | [manualfree]
      | ^
  444 | pub fn (mut sv ScrollView) cleanup() {
  445 |     mut subscriber := sv.parent.get_subscriber()
/home/ceremcem/.vmodules/ui/src/interface_scrollable.v:460:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  458 | }
  459 | 
  460 | [unsafe]
      | ^
  461 | pub fn (sv &ScrollView) free() {
  462 |     unsafe { free(sv) }
/home/ceremcem/.vmodules/ui/src/layout_canvas.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   22 | pub type CanvasLayoutDelegateFn = fn (c &CanvasLayout, e &gg.Event)
   23 | 
   24 | [heap]
      | ^
   25 | pub struct CanvasLayout {
   26 | pub mut:
/home/ceremcem/.vmodules/ui/src/layout_canvas.v:87:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   85 | }
   86 | 
   87 | [params]
      | ^
   88 | pub struct CanvasLayoutParams {
   89 |     CanvasLayoutStyleParams
/home/ceremcem/.vmodules/ui/src/layout_canvas.v:224:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  222 | }
  223 | 
  224 | [manualfree]
      | ^
  225 | pub fn (mut c CanvasLayout) cleanup() {
  226 |     mut subscriber := c.parent.get_subscriber()
/home/ceremcem/.vmodules/ui/src/layout_canvas.v:255:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  253 | }
  254 | 
  255 | [unsafe]
      | ^
  256 | pub fn (c &CanvasLayout) free() {
  257 |     $if free ? {
/home/ceremcem/.vmodules/ui/src/layout_column.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
    6 | import gx
    7 | 
    8 | [params]
      | ^
    9 | pub struct ColumnParams {
   10 |     id        string
/home/ceremcem/.vmodules/ui/src/layout_group.v:11:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
    9 | import eventbus
   10 | 
   11 | [heap]
      | ^
   12 | pub struct Group {
   13 | pub mut:
/home/ceremcem/.vmodules/ui/src/layout_group.v:41:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   39 | }
   40 | 
   41 | [params]
      | ^
   42 | pub struct GroupParams {
   43 | pub mut:
/home/ceremcem/.vmodules/ui/src/layout_group.v:80:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   78 | }
   79 | 
   80 | [manualfree]
      | ^
   81 | pub fn (mut g Group) cleanup() {
   82 |     for mut child in g.children {
/home/ceremcem/.vmodules/ui/src/layout_group.v:90:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   88 | }
   89 | 
   90 | [unsafe]
      | ^
   91 | pub fn (g &Group) free() {
   92 |     $if free ? {
/home/ceremcem/.vmodules/ui/src/layout_row.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
    6 | import gx
    7 | 
    8 | [params]
      | ^
    9 | pub struct RowParams {
   10 | pub:
/home/ceremcem/.vmodules/ui/src/layout_stack.v:49:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   47 | ***********************************/
   48 | 
   49 | [heap]
      | ^
   50 | pub struct Stack {
   51 |     cache CachedSizes
/home/ceremcem/.vmodules/ui/src/layout_stack.v:108:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  106 | }
  107 | 
  108 | [params]
      | ^
  109 | struct StackParams {
  110 |     StackStyleParams
/home/ceremcem/.vmodules/ui/src/layout_stack.v:217:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  215 | }
  216 | 
  217 | [manualfree]
      | ^
  218 | pub fn (mut s Stack) cleanup() {
  219 |     for mut child in s.children {
/home/ceremcem/.vmodules/ui/src/layout_stack.v:230:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  228 | }
  229 | 
  230 | [unsafe]
      | ^
  231 | pub fn (s &Stack) free() {
  232 |     $if free ? {
/home/ceremcem/.vmodules/ui/src/layout_stack.v:1363:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
 1361 | 
 1362 | //**** ChildrenParams *****
 1363 | [params]
      | ^
 1364 | pub struct ChildrenParams {
 1365 | mut:
/home/ceremcem/.vmodules/ui/src/layout_window.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   29 | pub type WindowScrollFn = fn (window &Window, e ScrollEvent)
   30 | 
   31 | [heap]
      | ^
   32 | pub struct Window {
   33 |     id string = '_window_'
/home/ceremcem/.vmodules/ui/src/layout_window.v:110:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  108 | }
  109 | 
  110 | [params]
      | ^
  111 | pub struct WindowParams {
  112 | pub:
/home/ceremcem/.vmodules/ui/src/layout_window.v:375:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  373 | }
  374 | 
  375 | [manualfree]
      | ^
  376 | fn gg_cleanup(mut window Window) {
  377 |     // All the ckeanup goes here
/home/ceremcem/.vmodules/ui/src/layout_window.v:1156:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
 1154 | }
 1155 | 
 1156 | [unsafe]
      | ^
 1157 | pub fn (w &Window) free() {
 1158 |     $if free ? {
/home/ceremcem/.vmodules/ui/src/style_button.v:27:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   25 | }
   26 | 
   27 | [params]
      | ^
   28 | pub struct ButtonStyleParams {
   29 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_checkbox.v:25:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   23 | }
   24 | 
   25 | [params]
      | ^
   26 | pub struct CheckBoxStyleParams {
   27 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_drawtextwidget.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   14 | }
   15 | 
   16 | [params]
      | ^
   17 | pub struct WidgetTextStyleParams {
   18 | pub mut:
/home/ceremcem/.vmodules/ui/src/style_dropdown.v:26:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   24 | }
   25 | 
   26 | [params]
      | ^
   27 | pub struct DropdownStyleParams {
   28 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_layouts.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   22 | }
   23 | 
   24 | [params]
      | ^
   25 | pub struct CanvasLayoutStyleParams {
   26 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_layouts.v:122:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
  120 | }
  121 | 
  122 | [params]
      | ^
  123 | pub struct StackStyleParams {
  124 | pub mut:
/home/ceremcem/.vmodules/ui/src/style_listbox.v:27:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   25 | }
   26 | 
   27 | [params]
      | ^
   28 | pub struct ListBoxStyleParams {
   29 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_menu.v:26:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   24 | }
   25 | 
   26 | [params]
      | ^
   27 | pub struct MenuStyleParams {
   28 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_progressbar.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   14 | }
   15 | 
   16 | [params]
      | ^
   17 | pub struct ProgressBarStyleParams {
   18 | pub mut:
/home/ceremcem/.vmodules/ui/src/style_radio.v:25:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   23 | }
   24 | 
   25 | [params]
      | ^
   26 | pub struct RadioStyleParams {
   27 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_rectangle.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   22 | }
   23 | 
   24 | [params]
      | ^
   25 | pub struct RectangleStyleParams {
   26 |     WidgetTextStyleParams
/home/ceremcem/.vmodules/ui/src/style_slider.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead
   14 | }
   15 | 
   16 | [params]
      | ^
   17 | pub struct SliderStyleParams {
   18 | pub mut:
...

/home/ceremcem/.vmodules/ui/src/widget_button.v:103:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
  101 |     on_mouse_move  ButtonMouseMoveFn
  102 |     on_mouse_enter ButtonMouseMoveFn
  103 |     on_mouse_leave ButtonMouseMoveFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104 |     height         int
  105 |     width          int
/home/ceremcem/.vmodules/ui/src/widget_checkbox.v:35:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   33 |     checked          bool
   34 |     ui               &UI = unsafe { nil }
   35 |     on_click         CheckBoxFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   36 |     on_check_changed CheckBoxFn
   37 |     text             string
/home/ceremcem/.vmodules/ui/src/widget_checkbox.v:36:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   34 |     ui               &UI = unsafe { nil }
   35 |     on_click         CheckBoxFn
   36 |     on_check_changed CheckBoxFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |     text             string
   38 |     justify          []f64
/home/ceremcem/.vmodules/ui/src/widget_checkbox.v:61:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   59 |     z_index          int
   60 |     text             string
   61 |     on_click         CheckBoxFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   62 |     on_check_changed CheckBoxFn
   63 |     checked          bool
/home/ceremcem/.vmodules/ui/src/widget_checkbox.v:62:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   60 |     text             string
   61 |     on_click         CheckBoxFn
   62 |     on_check_changed CheckBoxFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   63 |     checked          bool
   64 |     disabled         bool
/home/ceremcem/.vmodules/ui/src/widget_dropdown.v:27:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   25 |     hover_index          int
   26 |     is_focused           bool
   27 |     on_selection_changed DropDownFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   28 |     hidden               bool
   29 |     // bg_color             gx.Color = ui.dropdown_color
/home/ceremcem/.vmodules/ui/src/widget_dropdown.v:54:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   52 |     // text_size            f64
   53 |     theme                string = no_style
   54 |     on_selection_changed DropDownFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |     items                []DropdownItem
   56 |     texts                []string
/home/ceremcem/.vmodules/ui/src/widget_menu.v:494:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
  492 |     width       int
  493 | mut:
  494 |     action MenuItemFn
      |     ~~~~~~~~~~~~~~~~~
  495 | }
  496 |
/home/ceremcem/.vmodules/ui/src/widget_picture.v:33:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   31 |     ui        &UI = unsafe { nil }
   32 |     image     gg.Image
   33 |     on_click  PictureFn
      |     ~~~~~~~~~~~~~~~~~~~
   34 |     use_cache bool
   35 |     tooltip   TooltipMessage
/home/ceremcem/.vmodules/ui/src/widget_picture.v:46:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   44 |     z_index      int
   45 |     movable      bool
   46 |     on_click     PictureFn
      |     ~~~~~~~~~~~~~~~~~~~~~~
   47 |     use_cache    bool     = true
   48 |     ref          &Picture = unsafe { nil }
/home/ceremcem/.vmodules/ui/src/widget_radio.v:62:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   60 |     component voidptr
   61 |     // selected_value string
   62 |     on_click RadioFn
      |     ~~~~~~~~~~~~~~~~
   63 | }
   64 |
/home/ceremcem/.vmodules/ui/src/widget_radio.v:69:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   67 |     RadioStyleParams
   68 |     id       string
   69 |     on_click RadioFn
      |     ~~~~~~~~~~~~~~~~
   70 |     values   []string
   71 |     title    string
/home/ceremcem/.vmodules/ui/src/widget_slider.v:41:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   39 |     is_focused           bool
   40 |     dragging             bool
   41 |     on_value_changed     SliderFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   42 |     focus_on_thumb_only  bool
   43 |     rev_min_max_pos      bool
/home/ceremcem/.vmodules/ui/src/widget_slider.v:71:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   69 |     theme                string = no_style
   70 |     radius               int    = 5
   71 |     on_value_changed     SliderFn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |     focus_on_thumb_only  bool = true
   73 |     rev_min_max_pos      bool
/home/ceremcem/.vmodules/ui/src/widget_switch.v:37:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   35 |     open        bool
   36 |     ui          &UI = unsafe { nil }
   37 |     on_click    SwitchFn
      |     ~~~~~~~~~~~~~~~~~~~~
   38 |     on_key_down SwitchU32Fn
   39 |     hidden      bool
/home/ceremcem/.vmodules/ui/src/widget_switch.v:38:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   36 |     ui          &UI = unsafe { nil }
   37 |     on_click    SwitchFn
   38 |     on_key_down SwitchU32Fn
      |     ~~~~~~~~~~~~~~~~~~~~~~~
   39 |     hidden      bool
   40 |     // component state for composable widget
/home/ceremcem/.vmodules/ui/src/widget_switch.v:48:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   46 |     id          string
   47 |     z_index     int
   48 |     on_click    SwitchFn
      |     ~~~~~~~~~~~~~~~~~~~~
   49 |     on_key_down SwitchU32Fn
   50 |     open        bool
/home/ceremcem/.vmodules/ui/src/widget_switch.v:49:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   47 |     z_index     int
   48 |     on_click    SwitchFn
   49 |     on_key_down SwitchU32Fn
      |     ~~~~~~~~~~~~~~~~~~~~~~~
   50 |     open        bool
   51 | }
/home/ceremcem/.vmodules/ui/src/widget_textbox.v:152:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
  150 |     theme         string = no_style
  151 |     fitted_height bool
  152 |     on_key_down   TextBoxU32Fn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  153 |     on_char       TextBoxU32Fn
  154 |     // on_key_up          KeyUpFn
/home/ceremcem/.vmodules/ui/src/widget_textbox.v:153:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
  151 |     fitted_height bool
  152 |     on_key_down   TextBoxU32Fn
  153 |     on_char       TextBoxU32Fn
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  154 |     // on_key_up          KeyUpFn
  155 |     on_enter         TextBoxFn = TextBoxFn(0)
/home/ceremcem/.vmodules/ui/src/widget_transition.v:21:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   19 |     duration         i64
   20 |     animating        bool
   21 |     easing           EasingFunction
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   22 |     parent           Layout = empty_stack
   23 |     start_value      int
/home/ceremcem/.vmodules/ui/src/widget_transition.v:38:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`)
   36 |     duration       int
   37 |     animated_value &int = unsafe { nil }
   38 |     easing         EasingFunction
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |     ref            &Transition = unsafe { nil }
   40 | }
/home/ceremcem/.vmodules/ui/libvg/raster.v:45:11: warning: byte is deprecated, use u8 instead
   43 |         height: p.height
   44 |         channels: p.channels
   45 |         data: []byte{len: p.width * p.height * p.channels}
      |                 ~~~~
   46 |     }
   47 |     return r
/home/ceremcem/.vmodules/ui/libvg/raster.v:51:13: warning: byte is deprecated, use u8 instead
   49 | 
   50 | pub fn (mut r Raster) clear() {
   51 |     r.data = []byte{len: r.width * r.height * r.channels}
      |                ~~~~
   52 | }
   53 |
/home/ceremcem/.vmodules/ui/libvg/raster.v:59:13: warning: byte is deprecated, use u8 instead
   57 | 
   58 |     r.width, r.height, r.channels = img.width, img.height, img.nr_channels
   59 |     r.data = []byte{len: r.width * r.height * r.channels}
      |                ~~~~
   60 |     // println("${r.data.len}")
   61 |     unsafe { C.memcpy(r.data.data, img.data, r.data.len) }
/home/ceremcem/.vmodules/ui/libvg/raster.v:68:13: error: create_image() returns a Result, so it should have either an `or {}` block, or `!` at the end
   66 |         return
   67 |     }
   68 |     r.load(ctx.create_image(path))
      |                ~~~~~~~~~~~~~~~~~~
   69 | }
   70 |

...

   60 | fn (mut pb ProgressBar) init(parent Layout) {
   61 |     pb.parent = parent
   62 |     ui := parent.get_ui()
      |     ~~
   63 |     pb.ui = ui
   64 |     pb.load_style()
/home/ceremcem/.vmodules/ui/src/widget_radio.v:108:2: error: duplicate of a module name `ui`
  106 | fn (mut r Radio) init(parent Layout) {
  107 |     r.parent = parent
  108 |     ui := parent.get_ui()
      |     ~~
  109 |     r.ui = ui
  110 |     // Get max value text width
/home/ceremcem/.vmodules/ui/src/widget_rectangle.v:92:2: error: duplicate of a module name `ui`
   90 | fn (mut r Rectangle) init(parent Layout) {
   91 |     r.parent = parent
   92 |     ui := parent.get_ui()
      |     ~~
   93 |     r.ui = ui
   94 |     // r.init_style()
/home/ceremcem/.vmodules/ui/src/widget_slider.v:113:2: error: duplicate of a module name `ui`
  111 | fn (mut s Slider) init(parent Layout) {
  112 |     s.parent = parent
  113 |     ui := parent.get_ui()
      |     ~~
  114 |     s.ui = ui
  115 |     s.load_style()
/home/ceremcem/.vmodules/ui/src/widget_subwindow.v:95:6: error: duplicate of a module name `ui`
   93 |     subscriber.unsubscribe_method(events.on_mouse_move, s)
   94 |     subscriber.unsubscribe_method(events.on_mouse_up, s)
   95 |     mut ui := s.get_ui()
      |         ~~
   96 |     ui.window.evt_mngr.rm_receiver(s, [events.on_mouse_down])
   97 |     unsafe { s.free() }
/home/ceremcem/.vmodules/ui/src/widget_subwindow.v:185:40: error: duplicate of a module name `ui`
  183 | }
  184 | 
  185 | fn (mut s SubWindow) set_adjusted_size(ui &UI) {
      |                                        ~~
  186 | }
  187 |
/home/ceremcem/.vmodules/ui/src/widget_switch.v:69:2: error: duplicate of a module name `ui`
   67 | fn (mut s Switch) init(parent Layout) {
   68 |     s.parent = parent
   69 |     ui := parent.get_ui()
      |     ~~
   70 |     s.ui = ui
   71 |     mut subscriber := parent.get_subscriber()
/home/ceremcem/.vmodules/ui/src/widget_textbox.v:212:2: error: duplicate of a module name `ui`
  210 | pub fn (mut tb TextBox) init(parent Layout) {
  211 |     tb.parent = parent
  212 |     ui := parent.get_ui()
      |     ~~
  213 |     tb.ui = ui
  214 |     // tb.init_style()
/home/ceremcem/.vmodules/ui/src/widget_transition.v:58:2: error: duplicate of a module name `ui`
   56 | fn (mut t Transition) init(parent Layout) {
   57 |     t.parent = parent
   58 |     ui := parent.get_ui()
      |     ~~
   59 |     t.ui = ui
   60 | }
/home/ceremcem/.vmodules/ui/src/widget_transition.v:131:23: error: modifying variables via dereferencing can only be done in `unsafe` blocks
  129 |         }
  130 |         // Update the target value and request a redraw
  131 |         (*t.animated_value) = mapped
      |                             ^
  132 |         t.ui.window.refresh()
  133 |         // Set last_draw_target to check for target_value changes between renders.
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`
If the code of your project is in multiple files, try with `v .` instead of `v users.v`

Thanks for reporting.

Not sure how it happened, CI is green on vlang/v and vlang/ui (examples compile).

But I get the same error.

Will fix CI and V UI asap.

CI is failing on my side:
image

Try the following (you have old ui code, judging by the errors you pasted):

  1. rm -rf ~/.vmodules/ui
  2. v install ui
  3. cd ~
  4. v run ~/.vmodules/ui/examples/users.v

@spytheman Yup, that worked!