Re: Watching my Variables
Pat I am storing my saved file as an XML file. I restore the variable name into tglobal, restore the value into avar, then : do "put avar into" && tglobal The do statement also works for an array variable, but I do a loop first putting each value into avar[tKey] where tkey is each (stored) key name Martin On 10/06/05, Pat Trendler <[EMAIL PROTECTED]> wrote: > Martin, > Yes, it certainly wouldn't work in your example. The global would have to > exist in the first place to have a value even if it was empty. > > I'm interested in how you are using 'do' here. Is the saved file a rev stack > with the globals stored as custom properties, or is it a txt file. How do > you use the 'do'? > > Pat > [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Watching my Variables
Martin, Yes, it certainly wouldn't work in your example. The global would have to exist in the first place to have a value even if it was empty. I'm interested in how you are using 'do' here. Is the saved file a rev stack with the globals stored as custom properties, or is it a txt file. How do you use the 'do'? Pat [EMAIL PROTECTED] - Original Message - From: "Martin BLACKMAN" <[EMAIL PROTECTED]> To: Sent: Friday, June 10, 2005 9:28 PM Subject: Re: Watching my Variables I ran into a similar problem trying to save and recall a file for the program I am writing. The thing is I want my standalone to be able to open a saved file and along with data it should restore the values of all the global variables. So the way I though of is to store the globalnames together with their values in the save file. And to open a file and restore the values of global vars I use the 'do' form as expressed by Dennis. In such a case the method used by Pat would not work (of course it can be used for other purposes). The documentation says that 'do' is quite slow as it compiles in real time. Its not too slow for me but I'm not loading a terribly big file. Martin Date: Fri, 10 Jun 2005 12:11:41 +1000 From: "Pat Trendler" <[EMAIL PROTECTED]> Subject: Re: Watching my Variables To: "How to use Revolution" Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Just thought I'd show another way of doing this. I always get mixed up with where to put the "" when using those "do" things. put " " & value(item x of varNames) & cr after tList Pat [EMAIL PROTECTED] I ran into the same problem. I solved it with the do command do "put "&myVariableNameIsInHere Dennis ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Watching my Variables
I ran into a similar problem trying to save and recall a file for the program I am writing. The thing is I want my standalone to be able to open a saved file and along with data it should restore the values of all the global variables. So the way I though of is to store the globalnames together with their values in the save file. And to open a file and restore the values of global vars I use the 'do' form as expressed by Dennis. In such a case the method used by Pat would not work (of course it can be used for other purposes). The documentation says that 'do' is quite slow as it compiles in real time. Its not too slow for me but I'm not loading a terribly big file. Martin Date: Fri, 10 Jun 2005 12:11:41 +1000 From: "Pat Trendler" <[EMAIL PROTECTED]> Subject: Re: Watching my Variables To: "How to use Revolution" Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Just thought I'd show another way of doing this. I always get mixed up with where to put the "" when using those "do" things. put " " & value(item x of varNames) & cr after tList Pat [EMAIL PROTECTED] >I ran into the same problem. I solved it with the do command >do "put "&myVariableNameIsInHere >Dennis ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Watching my Variables
Just thought I'd show another way of doing this. I always get mixed up with where to put the "" when using those "do" things. put " " & value(item x of varNames) & cr after tList Pat [EMAIL PROTECTED] I ran into the same problem. I solved it with the do command do "put "&myVariableNameIsInHere Dennis - Original Message - From: "Derek Bump" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Thursday, June 09, 2005 10:11 AM Subject: Watching my Variables I am updating my Error Reporting script to include all variable information (Local, Global, etc) and I am wondering how I would get the contents of a variable who's name is held within a variable? Just analyze the script below and you'll see what I mean... -- Globals put cr&cr& "Global Variables..." &cr after theMessage put globalNames() into varNames repeat with x=1 to the number of items in varNames put " " & line x of varNames after theMessage put variableContents(line x of varNames) &cr after theMessage end repeat Derek Bump Dreamscape Software ___ Compress Images Easily with JPEGCompress 2.6.1 http://www.dreamscapesoftware.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Watching my Variables
Dennis Brown wrote: I ran into the same problem. I solved it with the do command do "put "&myVariableNameIsInHere Dennis...Thank you.! It worked perfectly. Derek Bump Dreamscape Software ___ Compress Images Easily with JPEGCompress 2.6.1 http://www.dreamscapesoftware.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Watching my Variables
Derek, I ran into the same problem. I solved it with the do command do "put "&myVariableNameIsInHere Dennis On Jun 8, 2005, at 8:11 PM, Derek Bump wrote: I am updating my Error Reporting script to include all variable information (Local, Global, etc) and I am wondering how I would get the contents of a variable who's name is held within a variable? Just analyze the script below and you'll see what I mean... -- Globals put cr&cr& "Global Variables..." &cr after theMessage put globalNames() into varNames repeat with x=1 to the number of items in varNames put " " & line x of varNames after theMessage put variableContents(line x of varNames) &cr after theMessage end repeat Derek Bump Dreamscape Software ___ Compress Images Easily with JPEGCompress 2.6.1 http://www.dreamscapesoftware.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Watching my Variables
I am updating my Error Reporting script to include all variable information (Local, Global, etc) and I am wondering how I would get the contents of a variable who's name is held within a variable? Just analyze the script below and you'll see what I mean... -- Globals put cr&cr& "Global Variables..." &cr after theMessage put globalNames() into varNames repeat with x=1 to the number of items in varNames put " " & line x of varNames after theMessage put variableContents(line x of varNames) &cr after theMessage end repeat Derek Bump Dreamscape Software ___ Compress Images Easily with JPEGCompress 2.6.1 http://www.dreamscapesoftware.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution