Skip to content
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

getToken* functions fail when setState/unsetState is used #1236

Closed
cwisniew opened this issue Feb 4, 2020 · 1 comment · Fixed by #1237
Closed

getToken* functions fail when setState/unsetState is used #1236

cwisniew opened this issue Feb 4, 2020 · 1 comment · Fixed by #1237
Assignees
Labels
bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.

Comments

@cwisniew
Copy link
Member

cwisniew commented Feb 4, 2020

Describe the bug
When the { setState: states } or { unsetState: states } options are used for the getToken functions the state names have an extra " in them

MapTool Info

  • Version: 1.5.12
@Phergus Phergus added bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) labels Feb 4, 2020
@cwisniew cwisniew self-assigned this Feb 4, 2020
@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Feb 6, 2020
@Phergus
Copy link
Contributor

Phergus commented Feb 6, 2020

Tested. getTokens() and getTokenNames() working correctly with following:

[h: cond = '{"setStates": ["Other"]}']
Other: [r: getTokenNames("json",cond)]<br>
[h: cond = '{"setStates": ["Hidden"]}']
Hidden: [r: getTokenNames("json",cond)]<br>
[h: cond = '{"setStates": ["Disabled"]}']
Disabled: [r: getTokenNames("json",cond)]<br>
[h: cond = '{"unsetStates": ["Hidden"]}']
<b>Not</b> Hidden: [r: getTokenNames("json",cond)]<br>
[h: cond = '{"unsetStates": ["Hidden","Disabled"]}']
<b>Not</b> Hidden or Disabled: [r: getTokenNames("json",cond)]<br>
[h: cond = '{"unsetStates": ["Hidden"], "setStates":["Other"]}']
Other but <b>Not</b> Hidden: [r: getTokenNames("json",cond)]<br>

@Phergus Phergus closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants