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

input list: new option to select a different delimiter #1210

Closed
Merudo opened this issue Jan 29, 2020 · 9 comments
Closed

input list: new option to select a different delimiter #1210

Merudo opened this issue Jan 29, 2020 · 9 comments
Assignees
Labels
feature Adding functionality that adds value 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

@Merudo
Copy link
Member

Merudo commented Jan 29, 2020

Is your feature request related to a problem?

When using the input dialog, there is an option to use a list to create a drop-down list of choices.

Unfortunately, the list needs to be comma delimited. This is inconvenient when working with items with themselves have commas in them.

Describe the solution you'd like
An option to specify a different delimiter for the list. Something such as

DELIMITER=X

where X is the delimiter to use. Additionally, the option to use a json array instead of a list would be welcome.

Additional context

One issue is that each option is separated by a space. Hence, I'm not sure how a delimiter including a space could be specified.

@Merudo Merudo changed the title input list: add option to select a different delimiter input list: new option to select a different delimiter Jan 29, 2020
@Azhrei
Copy link
Member

Azhrei commented Jan 29, 2020

Using JSON would seem to be a solution to embedded commas and spaces, but I can see some ease-of-use considerations for a single character as delimiter.

@Phergus Phergus added the feature Adding functionality that adds value label Jan 30, 2020
Merudo added a commit to Merudo/maptool that referenced this issue Jan 31, 2020
- Add option DELIMITER for drop-down lists in input.
- Default DELIMITER value is a comma, as before
- DELIMITER can't have spaces
- DELIMITER can be set to json, in which case a json array should be used instead of a list
- Close RPTools#1210
Merudo added a commit to Merudo/maptool that referenced this issue Jan 31, 2020
- Add option DELIMITER for drop-down lists in input.
- Default DELIMITER value is a comma, as before
- DELIMITER can't have spaces
- DELIMITER can be set to json, in which case a json array should be used instead of a list
- Close RPTools#1210
@Merudo
Copy link
Member Author

Merudo commented Jan 31, 2020

PR #1211 implements this.

@Phergus Phergus added documentation needed Missing, out-of-date or bad documentation macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) labels Feb 1, 2020
@Phergus
Copy link
Contributor

Phergus commented Feb 2, 2020

  • Add option DELIMITER for drop-down lists in input.
  • Default DELIMITER value is a comma, as before
  • DELIMITER can't have spaces
  • DELIMITER can be set to json, in which case a json array should be used instead of a list

@Phergus
Copy link
Contributor

Phergus commented Feb 2, 2020

Tested. Working as described.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Feb 2, 2020
@Phergus
Copy link
Contributor

Phergus commented Feb 2, 2020

Documentation and examples added to wiki page.

@Phergus Phergus removed the documentation needed Missing, out-of-date or bad documentation label Feb 2, 2020
@Phergus Phergus closed this as completed Feb 2, 2020
@Phergus Phergus removed the tested This issue has been QA tested by someone other than the developer. label Feb 3, 2020
@Phergus
Copy link
Contributor

Phergus commented Feb 3, 2020

Change may have broken something else. Following code works in 1.5.12 but not in current develop.

[h: foo = 'doSwitchInterMap|Change to other map, do not change to other map, do not change AND store coords|<html><span title="<html><b>Change to other map</b>: When using inter map teleport, switch to the map after teleportation<br><b>do not change to other map</b>: do NOT switch to destination map after teleportation<br><b>do not change AND store coords</b>: when using the do NOT switch map option, the system needs to<br>check the destination pad for the correct coords before sending the token there and then return to<br>the current map. This causes maptool to reload the current map. To prevent this you can use this third<br>option, which will store the coords of both pads on eachother during the <i>initialize pads</i> process.<br><b>BUT</b> that means that you CANNOT move the interPads without running <i>initialize maps</i> again.</html>">Automatically swap to map for interpads</span></html>|RADIO|SELECT=2']
[r: result = input(foo)]

@Phergus Phergus reopened this Feb 3, 2020
@Merudo
Copy link
Member Author

Merudo commented Feb 3, 2020

I'll work on a fix.

Merudo added a commit to Merudo/maptool that referenced this issue Feb 3, 2020
- Fix bug where radio delimiter was missing, generating a NPE
- Issue mentionned in RPTools#1210
@Merudo
Copy link
Member Author

Merudo commented Feb 3, 2020

PR #1233 fix this issue.

Also note that my previous PR added the DELIMITER option to radio lists, too.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Feb 3, 2020
@Phergus
Copy link
Contributor

Phergus commented Feb 3, 2020

Re-Tested. Radio button and Drop-down Lists now working.

@Phergus Phergus closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value 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

No branches or pull requests

3 participants