Hi,

I've seen that I can save it as a text file but this seems like a lot of work and for reasons explained below I don't think that this is the best way to do it (unless I have no alternative). I have really large number of controls and need to save the state of all of them. This is not just "Preferences" this is the whole of the GUI for a large application.

For instance, just one of main windows has seven panes (or tabs) and each one of these has 3 or 4 object groups with upwards of 20 controls in each group.

I don't want to save any "User Data" (e.g. names, addresses etc. etc. etc.), just the controls that act on the data. The data is obtained from an external source (usually an XML file) and the results of processing that data as per the current state of the controls is exported back to an XML file. The data itself is never shown to the user of this App!

Oh, c'mon, don't panic, it is even REALLY HARDER to do so with other tools!
The most ugly way i've ever seen, was offered (?) by MM "Director"... Brrrrrrr ;-)

Well I wouldn't use MM director either if it were difficult to save the state a Checkbox!


Why doesn't the documentation say anything about this?

I mean that if you look up the "save" command it makes no mention that you can't save a stack if it's a Standalone. In fact I've found the dictionary good for checking the syntax of a command/message but absolutely useless for putting the command/message into context.


OK, you can loop through all your (necessary) controls and put them
PLUS their values into a list, which you can then save as a text file...

Or do it manually, if you only have a couple of controls:

...
put "Name of checkbox 1" & TAB & the hilite of btn "Name of checkbox 1" & CR after myprefs
put "Name of checkbox 2" & TAB & the hilite of btn "Name of checkbox 2" & CR after myprefs
etc...
delete char -1 of myprefs ## get rid of last CR
put mylist into ... see below

But there are literally thousands of controls! Do I have to loop through all of them? What if I change the GUI to add or remove an item? Surely I'd have to keep changing the save/restore code! Seems very error prone to me!


And here is the advice WHERE to store your bloody prefs :-D

http://lists.runrev.com/pipermail/use-revolution/2003-December/026781.html

Then on "openstack" or whenever you can read in that list, if present and act accordingly...

XXX -> see above
...
if there is a file XXX then
    put url XXX  into mylist
    set the itemdel to TAB
   ## we saved the list as a tab delimited list...
   repeat for each line l in mylist
        set the hilite of btn (item 1 of l) to (item 2 of l)
   end repeat
end if

I found this already, but as I said this isn't preference data, this is normal GUI data. I do have a preferences panel and this refers to the preferences of the app, the rest of the (large number) of stacks/cards/controls refer to preferences on how to process the data from the XML file(s).


Not sure what is the best thing to do now.
All the Best
Dave






_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to