Start a new topic
Answered

Default Value for StringPairList

I am working on a plugin to replace self-defined chars in the name of Occurences.

A editable "StringPairList" is holding the search char and the replacing char.

My Problem is the default value for this StringPairList, that I define in the .xml :

 

<parameter name="replacingList" type="StringPairList" default="" description="Enter char and replacement" state="Stable"/>

 

It should be emtpy, but default=""  or default="[ ]"  leads to following error:


Cannot load preset value for parameter 'replacingList' in function 'renamingOccurrences' [Scripts_0x1]:


Invalid struct string


So whats the correct default value for a StringPairList to emtpy it in the GUI?


Another Question: Is it possible to keep the GUI Window open after pressing execute?

 


Best Answer

Hello Sebastian,

I'm really sorry for the late reply.


First, it's not possible today to keep the GUI Window opened after pressing execute. But the feature could be interesting.


The StringPairList default value is by default, empty. So, 'default="[]"' or no default at all should work fine. Which version of PiXYZ are you using? Are you sure you're not using a preset?


Best,

Nicolas





Hi Nicolas,


this error message is gone since the update from PiXYZ STUDIO 2019.1.1.8 to PiXYZ STUDIO 2019.1.2.15 

But it is still unclear, how to add default string pairs...  

For example this is not working, causing the function disappearing in the Plugins tab: default="[(ß,ss);(ä,ae)]"

Can you give me an example?



Answer

Hello Sebastian,

I'm really sorry for the late reply.


First, it's not possible today to keep the GUI Window opened after pressing execute. But the feature could be interesting.


The StringPairList default value is by default, empty. So, 'default="[]"' or no default at all should work fine. Which version of PiXYZ are you using? Are you sure you're not using a preset?


Best,

Nicolas




Login or Signup to post a comment