fltk-rs/fl2rust

Error generating wrong closure for MenuItem

Closed this issue · 4 comments

I'm creating a GUI with menu and compiler is throwing an error on MenuItem after generating it "closure is expected to take 1 argument, but it takes 0 arguments expected closure that takes 1 argument", I just need to put an unused parameter _ to fix, but I need to do it everytime I change the . fl file. I can be wrong but after taking a quick look I think it just need a _ between || at line 350 in gen.rs to fix, I don't have time now to check, but I can test this to see if it fix tomorrow, if this change doesn't affect other things

You’re right. It wasn’t modified after the 1.0 release of fltk-rs.
i’ll update the master branch but I won’t be able to publish a new version till later tonight. I

No problem, I just have time to check tomorrow. Thanks for this project and the quick response.

I've published a new version a few minutes ago.

It worked, thanks. I'm closing as it's fixed.