-
Notifications
You must be signed in to change notification settings - Fork 4
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
Exporting and Importing Multi-choosers #162
Comments
Thanks for reporting. It certainly looks like a bug. I tried to poke around and find a possible cause, but I haven't touched that code base in a while and need to get myself reacquainted with it. I'll probably start by tackling the long overdue #155, though. Would you consider moving to NetLogo 6.x if I get |
Hi Nicholas,
To begin with allow me to say that I think XW is a seriously useful enhancement to NetLogo. It makes it so much easier to build complex GUIs.
In regard to your question it looks like my code might well run under 6.x … and if not I’m convinced I could make it do so (and I’d like the excuse to do so).
The primary obstacle that originally held me back was my desire to use XW.
So ‘yes', let’s try going for the 6.x version.
Steve
On Nov 1, 2017, at 1:32 PM, Nicolas Payette <notifications@github.com<mailto:notifications@github.com>> wrote:
Is this a bug or am I doing something wrong?
Thanks for reporting. It certainly looks like a bug.
I tried to poke around and find a possible cause, but I haven't touched that code base in a while and need to get myself reacquainted with it.
I'll probably start by tackling the long overdue #155<#155>, though. Would you consider moving to NetLogo 6.x if I get xw working in it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#162 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABn8up16Ug_tUbxJ9Ww1wapyGjMyVMN5ks5syNVWgaJpZM4QFYL1>.
|
This fixes a bug where lists of strings where exported without quotes, but it seems like that's something that was only occuring with NL 6.0.2, and thus not the source of #162.
It seems like the values *do* get set correctly on import, they're just not showing in the swing widgets.
When importing from JSON, in the case of choosers, the selected item(s) was/where set before the actual items, and thus ignored by the Swing widget. This makes sure that the default property (which is usually the main setter) gets set last.
@stevebhall, thanks for the good words about I have upgraded the extension to work with NetLogo 6.0.2 and, hopefully, to fix the initialization of (multi-)chooser values on import. I'd be grateful if you could give it a spin and tell me if it works for you: |
Nicholas,
Will do!
Thanks for being so quick on this!
Steven
…Sent from my iPad
On Nov 11, 2017, at 11:56 AM, Nicolas Payette <notifications@github.com<mailto:notifications@github.com>> wrote:
@stevebhall<https://github.com/stevebhall>, thanks for the good words about xw's usefulness. :-)
I have upgraded the extension to work with NetLogo 6.0.2 and, hopefully, to fix the initialization of (multi-)chooser values on import.
I'd be grateful if you could give it a spin and tell me if it works for you:
https://github.com/CRESS-Surrey/eXtraWidgets/releases/tag/v2.0.0-BETA2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#162 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABn8ukudPgOFw8I14U1O28szKFTfzpIhks5s1fvlgaJpZM4QFYL1>.
|
Hi Nicholas,
After a bit a struggling to upgrade my model to run in NetLogo 6 I’ve now got it working again.
And the good/great news is that the xw save and load function is working great. Hurray!
But I have noticed a superficial issue … that I can’t seem to solve in my code.
The xw ‘buttons', which use to have, by default, this beautiful gray shading on them, now appear solid white. And I can’t seem to set them to any other color even when I explicitly ‘set’ the color. (my other xw widgets seem to be colored fine).
Steve
On Nov 11, 2017, at 11:56 AM, Nicolas Payette <notifications@github.com<mailto:notifications@github.com>> wrote:
@stevebhall<https://github.com/stevebhall>, thanks for the good words about xw's usefulness. :-)
I have upgraded the extension to work with NetLogo 6.0.2 and, hopefully, to fix the initialization of (multi-)chooser values on import.
I'd be grateful if you could give it a spin and tell me if it works for you:
https://github.com/CRESS-Surrey/eXtraWidgets/releases/tag/v2.0.0-BETA2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#162 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABn8ukudPgOFw8I14U1O28szKFTfzpIhks5s1fvlgaJpZM4QFYL1>.
|
Hurray indeed! And thanks for reporting and testing.
Thanks for reporting this too! I think this might be a new incarnation of #144, and I have moved the discussion there. |
I'm using NetLogo 5.3.1
I see in the documentation that multi-chooser strings should export and import correctly but I can't seem to get them to do that for me.
I can see that the selected-item is correctly written out in the JSON (e.g.,
"roe_maxAnticipatory-1": {
"COLOR": 58,
"ENABLED?": true,
"FONT-COLOR": 0,
"FONT-SIZE": 12,
"HEIGHT": 50,
"HIDDEN?": false,
"ITEMS": [
"None",
"Psych-1",
"Psych-2",
"Psych-3",
"Pain-1",
"Pain-2",
"Pain-3",
"Lethal"
],
"KEY": "roe_maxAnticipatory-1",
"KIND": "CHOOSER",
"LABEL": "Max Anticipatory",
"OPAQUE?": true,
"SELECTED-ITEM": "Lethal",
"TAB": "ROE",
"WIDTH": 125,
"X": 1105,
"Y": 290
},
But when its imported the selected-value remains the first option.
Is this a bug or am I doing something wrong?
The text was updated successfully, but these errors were encountered: