This is driving me insane.
I’ve broken my code into a bunch of structs. Makes things a lot cleaner for me, easier to keep organized.
I’ve also moved all my UI work into C# and dlls.
The issue I’m having is that I can’t get the dotnet event handlers to fire off. I get no errors, mind you. Just no functionality.
I’ve tried:
dotNet.addEventHandler (::CharacterConverter.Dialog.Controls.Find "closeButton" true)[1] "Click" ::CharacterConverter.Hide
dotNet.addEventHandler Dialog.closeButton "Click" this.Hide
and
dotNet.addEventHandler this.Dialog.closeButton "Click" this.Hide
…and they don’t work. However, as soon as I type:
button = CharacterConverter.Dialog.CloseButton
fn close = (format "Closing dialog.
"; CharacterConverter.Hide())
dotNet.addEventHandler button "Click" close
into the listener and click the button on the form, it works… What am I doing wrong?