kcvinker / Winforms

A simple GUI library for Odin programming language.
30 stars 2 forks source link

Error compiling the Winforms example. #1

Open Spoiledpay opened 7 months ago

Spoiledpay commented 7 months ago

1 - I downloaded the Winform Odin clone to a directory. Odin1

2 - I entered the command line inside the directory and tried to compile and it was not compiled. Like? odin build app.odin -file

odin2

3 - It didn't generate the executable code as an example, what could you have done wrong, can you help?

kcvinker commented 6 months ago

Hi, Thanks you for trying the sample code. I think you probably used the old sample code with updated lib. This is how the new sample code looks. I have changed the menu module a little bit. Please download and try the latest version. image

There are 3 overloads for a menubar_add_items proc.

  1. menubar_add_items :: proc(this: ^MenuBar, menuTxts: ..string)
  2. menubar_add_items :: proc(this: ^MenuBar, parentIndex: int, menu_txts: ..string)
  3. menubar_add_items :: proc(this: ^MenuBar, parentMenu: ^MenuItem, menu_txts: ..string)
Spoiledpay commented 6 months ago

Hello! I'm using the version in the repository, what would be the newer version? Not on GITHUB?

kcvinker commented 6 months ago

Can you please check the code in 'menu.odin' ? Check for menubar_add_items proc. It has 3 overloads. Just check the parameters. In my previous reply, I 've added signatures for all the three overloads. Just make sure you are using latest version.