[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Re:Gui Snapshot/presets



Hi Kernal,

Thanks for your help. But how do you source values from GUI objects and how do I implement the writeArchive and readArchive. Is there a help file in relation to this?

Thanks again,

Saul


On 28 Dec 2005, at 11:49, Saul Rayson wrote:

I wish to have some sort of preset snap shot of a gui I've built, so
the settings can be stored and opened.


like the MSP preset object?


On searching I've found PresetButtonViews...Does PresetButtonViews
work or is there a better way of doing this?


I tend to maintain an array of values sourced from GUI objects.  so,
each time a slider is tweaked the corresponding value in the array is
updated.
then you can use Object's writeArchive and readArchive to read/write to
disk.

e.g

synthArg = [1,3,5,7,9,11];
SCSlider(w,Rect(10,10,127,20)).action_({|v| synthArg.put(0,v.value)})
synthArg.writeArchive(filePath);
Object.readArchive(filePath);

perhaps you can think of other ways to use these archiving facilities?

kernel.