ui icon indicating copy to clipboard operation
ui copied to clipboard

iui/menu.v:201:7: error: unknown method or field: `iui.MenuItem.draw_event_fn`.

Open EmmaTheMartian opened this issue 3 years ago • 2 comments

When I'm trying to compile, in particular, Vide, I get the following error:

.vmodules/iui/menu.v:201:7: error: unknown method or field: `iui.MenuItem.draw_event_fn`.
2 possibilities: `add_child`, `set_click`.
  199 |         })
  200 |     }
  201 |     item.draw_event_fn(app, &Component(item))
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  202 | }

I've gotten this with both the latest version of IUI and the version of IUI that Vide was built with for 0.0.7-alpha.

After some digging, the function, does in fact, not exist.

EmmaTheMartian avatar Mar 21 '22 00:03 EmmaTheMartian

Odd, MenuItem should inherent the function from Component. I've now changed it to cast to Component, so should fix the error. Also wierd, according to the CI, it seems only macOS had this error.

pisaiah avatar Mar 21 '22 03:03 pisaiah

Odd, I'm on Debian 11 Linux. Perhaps it's a Unix-wide error, not just macOS.

EmmaTheMartian avatar Mar 26 '22 15:03 EmmaTheMartian