Re: When is a stack "dirty"?

2015-04-08 Thread dunbarx

I agree. Even if you put data into a field externally, say from the msg box, 
you are not asked to save the stack upon closing.


Craig



-Original Message-
From: Peter Haworth 
To: How to use LiveCode 
Sent: Wed, Apr 8, 2015 12:35 pm
Subject: When is a stack "dirty"?


After several years of using Livecode, I still don't understand how the
IDE
decides when a stack needs to be saved when I quit from it.

As an
example,  if I delete a substack by script then quit, the stack isn't
saved. 
If I change the vale of a custom property by script then quit, the
stack isn't
saved.  Same thing happens if I add a new substack by script.
And if I change
the value of a custom property by script.

Surely the IDE should be aware that
a save is needed in those
circumstances?


Pete
lcSQL Software

Home of lcStackBrowser
 and
SQLiteAdmin

___
use-livecode
mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe,
unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread J. Landman Gay

On 4/8/2015 11:33 AM, Peter Haworth wrote:

After several years of using Livecode, I still don't understand how the IDE
decides when a stack needs to be saved when I quit from it.

As an example,  if I delete a substack by script then quit, the stack isn't
saved.  If I change the vale of a custom property by script then quit, the
stack isn't saved.  Same thing happens if I add a new substack by script.
And if I change the value of a custom property by script.

Surely the IDE should be aware that a save is needed in those
circumstances?


Basically it knows you made a change when you do something manually. 
Changing anything by script is sent directly to the engine and the IDE 
doesn't know about it.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread Peter Haworth
Couldn't the engine let the IDE know that a stack needs to be saved?

I can't think of any other program I use where it's my responsibility to
ensure I save any changes I make.  It really makes LC look outdated.

I think there's a global property in the IDE that indicates whether a stack
needs saving or not.  I guess I'll have to change my scripts to set it.

Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 

On Wed, Apr 8, 2015 at 10:40 AM, J. Landman Gay 
wrote:

> On 4/8/2015 11:33 AM, Peter Haworth wrote:
>
>> After several years of using Livecode, I still don't understand how the
>> IDE
>> decides when a stack needs to be saved when I quit from it.
>>
>> As an example,  if I delete a substack by script then quit, the stack
>> isn't
>> saved.  If I change the vale of a custom property by script then quit, the
>> stack isn't saved.  Same thing happens if I add a new substack by script.
>> And if I change the value of a custom property by script.
>>
>> Surely the IDE should be aware that a save is needed in those
>> circumstances?
>>
>
> Basically it knows you made a change when you do something manually.
> Changing anything by script is sent directly to the engine and the IDE
> doesn't know about it.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: When is a stack "dirty"?

2015-04-08 Thread Ralph DiMola
>Peter Haworth Wrote:
>I can't think of any other program I use where it's my responsibility to
ensure I save any changes I make.

I agree. The other day I changed a custom property and exited out of LC and
it did not ask to save as I expected. So I restarted LC made the change
again then saved manually and closed LC. Took me by surprise. Any change at
all to the stack or any sub stacks should set the IDE dirty flag.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread J. Landman Gay

On 4/8/2015 1:15 PM, Peter Haworth wrote:

Couldn't the engine let the IDE know that a stack needs to be saved?


I'd think so. It would be a good feature request.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread Peter Haworth
QCC # 15184

Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 

On Wed, Apr 8, 2015 at 11:38 AM, J. Landman Gay 
wrote:

> On 4/8/2015 1:15 PM, Peter Haworth wrote:
>
>> Couldn't the engine let the IDE know that a stack needs to be saved?
>>
>
> I'd think so. It would be a good feature request.
>
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread stephen barncard
On Wed, Apr 8, 2015 at 9:33 AM, Peter Haworth  wrote:

> Surely the IDE should be aware that a save is needed in those
> circumstances?
>

I never thought about it.
I save save save save all the time anyway and never trusted the IDE to
remind me.

--
Stephen Barncard - Sebastopol Ca. USA - Deeds Not Words
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread Peter Haworth
Well I think that's my problem - I should be able to trust the IDE :-)

Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 

On Wed, Apr 8, 2015 at 12:29 PM, stephen barncard <
stephenrevoluti...@barncard.com> wrote:

> On Wed, Apr 8, 2015 at 9:33 AM, Peter Haworth  wrote:
>
> > Surely the IDE should be aware that a save is needed in those
> > circumstances?
> >
>
> I never thought about it.
> I save save save save all the time anyway and never trusted the IDE to
> remind me.
>
> --
> Stephen Barncard - Sebastopol Ca. USA - Deeds Not Words
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread Mark Schonewille

Hi Pete,

The variable gRevStackStatus["Short name of a stack"] is set to true 
whenever a control moves or changes as the result of user input. 
Messages triggering an update or gRevStackStatus are openField and 
focusIn for example. I think that moveControl and resizeControl are 
monitored too. I haven't checked which messages are monitored, for a 
long time.


Whenever you bring a stack with a field to the front, the IDE finds the 
first field that has the lockText set to false and the traversalOn set 
to true. This field gets focus and gRevStackStatus is set to edited.


Whenever you try to close a stack, or quit the IDE, LiveCode briefly 
sets the focus to each of the stacks that is currently visible. The 
first field gets the focus and thus the gRevStackStatus is set to true 
--if it has a field.


In other words, the IDE sets gRevStackStatus to true for any stack with 
a field, before you close it, and you will always see a Save dialog for 
these stacks.


If you want to prevent this from happening, you will need to write your 
own frontscript that handles the closeStackRequest, shutDownRequest and 
appleEvent messages.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi


LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 4/8/2015 18:33, Peter Haworth wrote:

After several years of using Livecode, I still don't understand how the IDE
decides when a stack needs to be saved when I quit from it.

As an example,  if I delete a substack by script then quit, the stack isn't
saved.  If I change the vale of a custom property by script then quit, the
stack isn't saved.  Same thing happens if I add a new substack by script.
And if I change the value of a custom property by script.

Surely the IDE should be aware that a save is needed in those
circumstances?


Pete



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread Jerry Jensen

> On Apr 8, 2015, at 12:29 PM, stephen barncard 
>  wrote:
> 
> On Wed, Apr 8, 2015 at 9:33 AM, Peter Haworth  wrote:
> 
>> Surely the IDE should be aware that a save is needed in those
>> circumstances?
>> 
> 
> I never thought about it.
> I save save save save all the time anyway and never trusted the IDE to
> remind me.

Me too. Save, save, save. I seem to work a lot on things that are crash-y. Not 
LC crashes necessarily, but hangs from drivers and other finicky external 
beasties. Just hitting the Apply button is enough to make me nervous.
.Jerry


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is a stack "dirty"?

2015-04-08 Thread Peter Haworth
Thanks for the info Mark.  That probably explains what is happening in my
case because the substack I delete is not open at the time I delete it.

What I'm thinking of doing is setting the gRevStackStatus element for the
main stack of the deleted substack in my script which sounds like it should
result in the IDE issuing a save prompt when I quit.  I will probably have
to do the same thing when, for example, I change the value of a custom
property in an unopened stack.

Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 

On Wed, Apr 8, 2015 at 1:09 PM, Mark Schonewille <
m.schonewi...@economy-x-talk.com> wrote:

> Hi Pete,
>
> The variable gRevStackStatus["Short name of a stack"] is set to true
> whenever a control moves or changes as the result of user input. Messages
> triggering an update or gRevStackStatus are openField and focusIn for
> example. I think that moveControl and resizeControl are monitored too. I
> haven't checked which messages are monitored, for a long time.
>
> Whenever you bring a stack with a field to the front, the IDE finds the
> first field that has the lockText set to false and the traversalOn set to
> true. This field gets focus and gRevStackStatus is set to edited.
>
> Whenever you try to close a stack, or quit the IDE, LiveCode briefly sets
> the focus to each of the stacks that is currently visible. The first field
> gets the focus and thus the gRevStackStatus is set to true --if it has a
> field.
>
> In other words, the IDE sets gRevStackStatus to true for any stack with a
> field, before you close it, and you will always see a Save dialog for these
> stacks.
>
> If you want to prevent this from happening, you will need to write your
> own frontscript that handles the closeStackRequest, shutDownRequest and
> appleEvent messages.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Installer Maker for LiveCode:
> http://qery.us/468
>
> Buy my new book "Programming LiveCode for the Real Beginner"
> http://qery.us/3fi
>
> LiveCode on Facebook:
> https://www.facebook.com/groups/runrev/
>
> On 4/8/2015 18:33, Peter Haworth wrote:
>
>> After several years of using Livecode, I still don't understand how the
>> IDE
>> decides when a stack needs to be saved when I quit from it.
>>
>> As an example,  if I delete a substack by script then quit, the stack
>> isn't
>> saved.  If I change the vale of a custom property by script then quit, the
>> stack isn't saved.  Same thing happens if I add a new substack by script.
>> And if I change the value of a custom property by script.
>>
>> Surely the IDE should be aware that a save is needed in those
>> circumstances?
>>
>>
>> Pete
>>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode