Page 1 of 1

saving a string value-after compile

Posted: Tue Aug 13, 2013 9:03 am
by kortezzzz
hi all.

I posted yesterday about a problem with saving string data in exe apps (made by FS) after compiling, but
it seems that nobody knows anything about it :cry:

so i have a very simple question about string data:
can exe apps (made by FS) read and save string data in their internal memory and reload it
next time the app is opened (without using a preset manager)?!
because i find it impossible. i try to save a text data (using a string check-box) and it doesn't
save it.

If anybody knows what is the reason, please help.
THANKS

Re: saving a string value-after compile

Posted: Tue Aug 13, 2013 10:02 am
by billv
kortezzzz wrote:(without using a preset manager)

Yes..here's an example...There's also stacks of info on all this at SM forum....
there is a "preset manager module" inside it,
But it's just there for host automation..delete it if not required
http://www.dsprobotics.com/support/viewtopic.php?f=2&t=1441&start=20#p7243

Re: saving a string value-after compile

Posted: Tue Aug 13, 2013 11:33 am
by tester
Not sure if I understand the question correctly, but here are some thoughts from practice.

You can use external "config file" (fixed name), always loaded on app start. Config file may contain then other file paths/names, so that other files are loaded on startup too.

Few things to remember.

Loading other external files (i.e. indexed in main config file) - must be triggered after the main config file was loaded (so - not through afterload prim, but from output that loaded the config). It's a matter of correct trigger order.

In order to load a file (config file) when app starts - you must add timer/delay to afterload primitive connected to loader (whatever delay - I use 1-50ms). This is/was an unsolved bug in SM/FS. Filesystem management is loaded after initialization trigger is sent. But as far I remember - this issue may refer only to relative filepaths (so - yes, config file may be pointed through relative path, and thus - you may freely copy the whole pack); not tested with absolute.

Re: saving a string value-after compile

Posted: Tue Aug 13, 2013 2:18 pm
by kortezzzz
thanks a lot guys. well, Billv already solved my problem, at my other post with a great schematic.
now, i understand much better how FS made exe files behave after compiling.
THANKS A LOT AGAIN. :D