Program Testing and Persistent Properties
warren at howsoft.com
Sat Aug 7 20:26:12 CDT 2004
Dear Troy and Ken,
As far as I can see, the suggested solution -
put EMPTY into Field "Field 1"
- is more or less the same as I described in the article
Set the text of Field1 to ""
What worries me about this solution is that if my program set 99 other
properties when I test-ran it, would I have to put 99 other statements of
this type in the openCard handler?
In relation to the suggestion about setting the stack to 'cantModify', I
find that if I do this, Rev won't allow me to save the stack at all!
Regarding the "higher purpose" of retaining acquired properties once the
program test-run has been ended, I am fully prepared to believe that I am
suffering from blind-spots because of my experience with VB and that higher
purposes really exist, but at this point I have some difficulty still:
1. Why would I want to save the user's input values in the stack?
2. As the article indicated, I was aware of an (outdated?) use of retaining
drawings. But in practical terms nowadays I wouldn't do that anyway because
of the "jaggies", and as I showed in my article at
http://www.howsoft.com/runrev/svg.htm , the best solution to drawing (for me
at least) is with vector graphics using the altBrowser.
>On 8/7/04 1:49 PM, "Troy Rollins" <troy at rpsystems.net> wrote:
<The "higher purpose" is that it makes it extremely easy to save a users
<input values, drawings, data, etc. simply by saving the stack. It is
<basically a shifting of how you think about programming. The concept
<that it shouldn't be hard to save a user's input and data is one of the
<driving forces behind this.
>> To correct this, all Bob needed to do was place scripts like -
>> on openCard
>> put EMPTY into Field "Field 1"
>> end openCard
>> This would clear the field each time the card was opened.
>The other way would be to make sure the fields were empty, and then set the
>'cantModify' of the stack to true, and save the stack. The next and
>subsequent times that it opened, the fields would be empty.
More information about the use-livecode