Losing data when quitting

J. Landman Gay jacque at hyperactivesw.com
Sat Jan 3 14:13:41 EST 2009


Paul Looney wrote:
> JLG,
> Do you recall the bug number? Maybe we could get some new votes.

I never really looked to see...but a search I just did indicates that 
bug 302 is the closest match (that shows you how old the bug is) and 
that one is marked "not a bug". It really isn't quite the same as we're 
describing but it's close. The issue at hand here is whether a focused 
field changes focus when a button is clicked. According to Scott Raney, 
no OS removes focus from a field when a button is clicked, so the 
current behavior is correct. I guess I agree with that.

The problem is that the IDE doesn't see a change in focus either, which 
results in the missing "save" dialog. Not sure how to handle this; maybe 
a new bug report would alert the team that a patch in the IDE is 
necessary for just this "save" issue. It won't change any problems the 
rest of us have with other scripts that rely on closefield -- for 
example, when changing cards. For those situations I usually do 
something like this in my scripts:

   on closeCard
    if the selectedfield <> ""
    then send "closefield" to the selectedfield
   end closeCard

Sometimes I need to put something similar into buttons or other places 
too, it all depends on the scripts I'm using. This handler isn't exactly 
correct though, because if the field content hasn't changed then sending 
a "closefield" message isn't always what you want.


> Paul Looney
> On Jan 2, 2009, at 5:44 PM, J. Landman Gay wrote:
> 
>> Paul Looney wrote:
>>
>>> There may be other recipes as well, but the stack saving problem 
>>> seems to be related to the lack of a closeField - which is not sent 
>>> if the focus is still in the edited field when the stack is closed.
>>
>> This is a really old bug, I remember working around it years ago. I've 
>> gotten so used to tabbing out of fields before I close a stack that I 
>> hardly ever see the problem any more. But that isn't a good solution 
>> for everyone.
>>
>> On the other hand, I wish there were some way to get Rev to *stop* 
>> asking me to save. I have some utility stacks with text display 
>> fields, but the text is temporary and I never want it saved. But every 
>> time I close the stack, Rev bugs me about saving changes. I now only 
>> open those stacks in the MetaCard IDE, where it leaves me alone.
>>
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list