New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating listbox values with new .listbox() method does not seem to work #446
Comments
Thanks for the comments! At the moment, I think all of the list style widgets (option, list & spin) are set to select the parameter received when an already existing widget is referenced. I remember trying to decide what was best here - what is the most common use case. I came to the conclusion that it would be selecting an item, rather than updating the whole list. And, as the listbox supports multi-select, it will accept a list of values to select. So, first there should be an error I assume none of the items in your new list were in your old list - appJar should warn you about this. And, second, there should be some way to specify to update/append/select items in the list... |
Ok ! I saw in your code that the behavior was selecting but i didn't think enough about it to understand why ... Now i do ;-) You're right, none of the items in the new list where in the old list, but as old list was an empty list this didn't throw any error ... I really liked the design choice you made deciding You're right, there should be some way to specify to update/append/select items in the list, and it's clearly not such a simple question to decide which would be the most natural and simple way to get it done ... |
Improved validation on selecting items in listbox #446 - displays warning and returns success/failure boolean
In response to #446 docs have been updated.
OK, I've introduced more error checking on the listbox, so hopefully you'll now get messages when strange things happen. I've also updated the docs to make it more clear. I'm going to close this issue, and open a new one to discuss implementing the different changing features... |
Simplifications of upcoming appJar v1.0 are already available in 0.92 so i began to test them. They are a considerable improvement of appJar in my opinion, and I'm very interested in using appJar v1.0 with my students. So first of all i want to thank you for your great job !
I wanted to tell you that I noticed that updating values of a list box in v1.0 style, with some instruction like
app.listbox('mylistbox', mylistofvalues)
, does not yet work as it should (it does nothing at all). For now it seems to me that you have to stick to the "old way", that isapp.updateListBox('mylistbox', mylistofvalues)
.Hope this helps though it's a really tiny bug (more an occasion to thank you than anything else ;-)).
The text was updated successfully, but these errors were encountered: