Page 1 of 1

What if scenario - for presaved data file [txt]

Posted: Tue May 14, 2013 10:45 pm
by RJHollins
Hello GANG!

Have a general programming question to ask. Would sure appreciate experienced insights :)

I have my very first VST app up and running .. YEAH !

Within this VST, I'm using a separate 'configuration' file that stores User entered data. This 'text' file is auto-loaded at the start. The User can modify values and then re-save the file. This is all working good. [BTW, I also use a Preset Manager prim [hidden] to collect all knobs names and things as a separate entity].

My question goes to this ... future compatibility. ?!?

What would happen if I needed to expand the amount of User data to be saved to this text file ??

For example:

With the current app, Users are working away using the data they've entered. At some future point, an idea comes up to add an addition 'user defined' section. This would mean expanding the data list that was previously saved.

OK ... I now know how to modify the program, adding any additional Arrays to add to the 'big list' ... the question is one of compatibility now.

What [if any] issue would be if I add more arrays to store? ... Will the 'original' data saved be messed up or produce an EOF error type of thing ???

Kinda thinking out loud on this potential issue, and would like to consider 'best options' before releasing out into the wild.

Thanks for any 'schooling' on this :lol:

Re: What if scenario - for presaved data file [txt]

Posted: Tue May 14, 2013 10:59 pm
by tester
It depends on how you define your custom file from inside. If you preserve the structure (like the amount comma separated of columns), it will be fine. If you decide to change readings order, then I would add some markpoint, to filter lines according to first column mark for example.

I also use some custom files, that are read and saved independent from preset manager. Preset manager stores only the path to that file. If your file is corrupted, then modules that receive the information - will just get confused things (either texts different than expected, or things rounded to "acceptable values"; string = 0 for example).

Re: What if scenario - for presaved data file [txt]

Posted: Tue May 14, 2013 11:34 pm
by RJHollins
Hi tester !

Thanks for stopping in :)

From your description ... I basically have 3 indexed arrays(16). I've combined these into a single group [basically appending one after another, into a single stored file.

I then reversed the process on loading.

It seemed the reasonable thing to do at the time :lol:

I wouldn't be changing any of the data order ...

So I gather that IF [down the road] I need to add another array [or three] ... that I could 'tag' these onto the end of the other arrays, and save off this list.

The concern was with the LOADING.

If the original app was loading 3 arrays, and now the loading was calling on 5 arrays [for example] .... would those added arrays just remain blank? No error message ?

Of course, the new SAVE routine would have all 5 arrays, but the FIRST loading would only see 3 of the original array data. [does that make any sense]

Again ... just looking for a potential problem ... am I concerned over nothing ???

Re: What if scenario - for presaved data file [txt]

Posted: Tue May 14, 2013 11:43 pm
by tester
I wouldn't expect an error, rather lack of expected behavior/readings.

I haven't played with separate arrays yet that way (I'm storing single entries, and then reload them from a single array), but on your place - I would just add few more arrays and checked how it behaves. Or - make a dummy example (remove anything unimportant), to show on living schematic what you look for.

If adding more things like that is complicated, then I would look for a method of making it easy. Otherwise, when you decide to bring something new a year later - you may not remember what was all about.