Closed wwderw closed 2 years ago
How are you using it?
This example works:
import nigui
app.init()
var window = newWindow()
var container = newLayoutContainer(Layout_Vertical)
window.add(container)
var comboBox = newComboBox(@["Option 1", "Option 2"])
container.add(comboBox)
comboBox.onChange = proc(event: ComboBoxChangeEvent) =
echo comboBox.value
window.show()
app.run()
Using your exact code, I get error unidentified identifier (which is the same error that I got earlier).
Now, I am on 1.7.1 Dev for Nim. Would that have any bearing on it?
I have created a new NiGui release (v0.2.6), which includes the ComboBox onChange event. The previous release (v0.2.5) did not include this. I think this will fix your unkown identifier error. The compiler version should not be relevant.
That seems to have done it from what I can tell.
Thanks!
The ComboBoxChangeEvent does not appear to be working (or in) the latest version of Nigui. I had to go back to when ComboBox was first added in order to get the functionality back (I may not have needed to regress that far back, but I did that just to make sure).
I don't know if this was on purpose if combobox is to be deprecated or if this is bug, just thought I would mention.
Using the latest dev Nim branch on Arch.