Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Edit Box(multiline) and preset string

For general discussion related FlowStone

Edit Box(multiline) and preset string

Postby willzz32 » Sun Aug 11, 2013 3:12 pm

Hi All

Got a question regarding the preset string. (flowstone 3.02)

I am using the edit box in multi line mode and sending this across to the preset string. All works well and as expected the string shows multi line output when hooked up to a text box. When i save the string via the preset text file all the data is also saved correctly, The problem is when loading the data back in via the preset text file and manager the preset string only shows the first line of the data.

Is this a know issue or am i missing something obvious regarding this. I could use string arrays which work properly but this means i have to save a text file for each array.

Any help would be much welcomed.

Cheers
willzz32
 
Posts: 20
Joined: Thu Jul 29, 2010 7:59 pm

Re: Edit Box(multiline) and preset string

Postby tester » Sun Aug 11, 2013 3:21 pm

It's not issue. Single-line string and multi-line text - both share the same connectors, and this causes such things. If you have multi-line text - you need convert it into single-line string (max 255 chars per "preset string" prim) using unique separator (like comma), which you use then to split the string into multi-line text again after reload.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Edit Box(multiline) and preset string

Postby willzz32 » Sun Aug 11, 2013 3:32 pm

Hi tester

Thanks for the fast reply and your help.

Do i need to separate it within the edit box as i type or can this be done after the edit box .Such as adding a comma each time a new line is entered or reached.

I'm making a small note pad that can follow cues so as to make notes during shows.


Cheers
willzz32
 
Posts: 20
Joined: Thu Jul 29, 2010 7:59 pm

Re: Edit Box(multiline) and preset string

Postby tester » Sun Aug 11, 2013 5:40 pm

Check here:
viewtopic.php?f=2&t=1441&start=10#p7221

No need for separator in editbox; conversion is detected/done per line.

Generally you need select a separator (comma or else), that will be not used in editbox. In above link you find an example how to convert array to such string back and forth. In between - you just place the "preset string" prim.

But keep in mind, that this way - single "preset string" prim can handle a string only 255 chars long, including separators.

Hope this helps a little bit.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Edit Box(multiline) and preset string

Postby willzz32 » Sun Aug 11, 2013 5:46 pm

Hi tester

Thanks for the help and pointing me in the right direction. Very Much appreciated.

Cheers
willzz32
 
Posts: 20
Joined: Thu Jul 29, 2010 7:59 pm

Re: Edit Box(multiline) and preset string

Postby Nubeat7 » Sun Aug 11, 2013 6:02 pm

tester wrote:Check here:
viewtopic.php?f=2&t=1441&start=10#p7221

No need for separator in editbox; conversion is detected/done per line.



the same in ruby would look like this, maybe all the ruby regex would be of interest for following cues
Attachments
split_join_comma.fsm
(410 Bytes) Downloaded 922 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Edit Box(multiline) and preset string

Postby willzz32 » Sun Aug 11, 2013 7:35 pm

Hi Nubeat7

Thanks so much for that , I have been scratching my head trying to get a grip of it even going trough the post tester pointed me to.I work a lot in midi in FS so this is a problem i have not had to get my head around before.
From what you have posted looks like i can now split the edit box multi ,save it as a single string and reload and resplit it.

Thanks for your help!!!!!
willzz32
 
Posts: 20
Joined: Thu Jul 29, 2010 7:59 pm

Re: Edit Box(multiline) and preset string

Postby willzz32 » Sun Aug 11, 2013 8:17 pm

Hi

That works really well loads and save correctly , only problem i have now is when i load all the text is in the right place apart from when i start to edit, all the text jumps on to one line but only when editing.

Any thoughts?
willzz32
 
Posts: 20
Joined: Thu Jul 29, 2010 7:59 pm

Re: Edit Box(multiline) and preset string

Postby RJHollins » Mon Aug 12, 2013 3:36 am

Nubeat7 wrote:
tester wrote:Check here:
viewtopic.php?f=2&t=1441&start=10#p7221

No need for separator in editbox; conversion is detected/done per line.



the same in ruby would look like this, maybe all the ruby regex would be of interest for following cues

Thanks for a RUBY version, NuBeat !
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Edit Box(multiline) and preset string

Postby Nubeat7 » Mon Aug 12, 2013 11:22 am

willzz32 wrote:Hi

That works really well loads and save correctly , only problem i have now is when i load all the text is in the right place apart from when i start to edit, all the text jumps on to one line but only when editing.

Any thoughts?

difficult to say without schmatic..
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Next

Return to General

Who is online

Users browsing this forum: No registered users and 133 guests