Page 1 of 1

Dialog Options Array Splits Choices

PostPosted: Sat Jul 15, 2023 12:14 am
by john1598360627
ISSUE
https://wiki.servoy.com/display/DOCS/di ... ptionArray)

Using the Servoy dialog plugin I noticed a problem. For whatever reason, whenever a ',' character appears the option is split. This applies to any category of the dialog. Now, when making the buttons (ok vs cancel) it's not that big of a deal I guess.

However, it's also being applied to options within an Array.

EXAMPLE
Code: Select all
   
function ini_dialog(){
      title = 'NEW PI'
      
      message = 'Add a new PI to the fund. Enter Name:'
      
      response = plugins.dialogs.showSelectDialog( title, message , arr_pi )
   }


The arr_pi is an array filled with first and last names split with commas.

ie

arr_pi[0] = Elizabeth, Sarah
arr_pi[1] = Hunter, Smith
(etc...)

However, the commas within each array item cause it to split apart.

So within the selector dialogue options it looks like;
Elizabeth
Sarah
Hunter
Smith


When it SHOULD look like this;
Elizabeth, Sarah
Hunter, Smith



As for why this is happening, when I application.output the array I noticed that it looks like this;
Code: Select all
arr_pi[Elizabeth, Sarah,Hunter, Smith]

Maybe that's why it's automatically splitting the options once it sees a comma? Cus it can't interpret the actual columns? Just a guess.


HELP

Is there any way to disable this behavior? I'm not really sure what the purpose of it is anyways. I just want one index per dialog selection. No automatic splitting whenever a comma appears.

Re: Dialog Options Array Splits Choices

PostPosted: Fri Aug 11, 2023 7:01 pm
by sean
Hi John,

Please file a case at Servoy Support.

I believe this method takes an array or strings directly in the arguments object they strings in the array are being split on the comma.

Best,
Sean

Re: Dialog Options Array Splits Choices

PostPosted: Mon Aug 14, 2023 12:13 am
by kwpsd
Created Support Ticket: SVY-18482

Re: Dialog Options Array Splits Choices

PostPosted: Thu Nov 23, 2023 12:00 am
by john1598360627
I finally updated to the new release that apparently fixed it.

Double checked to see and it did seem to be fixed. Thank you!

I'll be on the lookout if I notice any other issues with the plugin and make sure to report them if necessary.