Re: what's this stack

2010-11-17 Thread Robert Brenstein

On 15.11.2010 at 17:42 Uhr -0800 Mark Smith apparently wrote:

Robert Brenstein wrote:


 change your code as follows to resolve this for yourself ;-)

 on savenotes
 modeless stack save
 answer Saving  (the short name of this stack) -- just to know




Interesting, when I put the answer line in the notepad stack script I get
saving notepad. But when I put it into the save substack it says saving
save. I couldn't find a way for the save substack to say saving notepad
and saving save looks dumb. So, yes, I know now which stack is being saved
but how do I let the user know? One idea (not tested) is to put a blank
label in the save stack and then try and put the Saving  stuff into the
save stack label. I think i'll give that a try and let you know how it
works.


So what you find confirms that 'this' refers to the active stack, 
which should be what the defaultstack function returns.


The answer command was meant only to figure out what is the meaning 
of 'this' at that point. You said that one stack is the substack on 
the other, so it does not matter which this is being saved since 
saving affects all stacks in a given stackfile.


I presumably misunderstood what you meant, but using answer to tell 
something to end-user (in context of saving) is not a good idea since 
answer interrupts the program.


If you want to enhance your program to tell user the name of its file 
(if your program can open multiple user files, for example), you can 
pass it as parameter, keep in a global/local (depending on your 
structure) or reverse engineer from the mainstack's name/title.


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


Re: what's this stack

2010-11-15 Thread Robert Brenstein

On 14.11.10 at 17:35 -0800 Mark Smith apparently wrote:

Hi, I recently wrote this code which works fine

on savenotes
   modeless stack save
   save this stack
   wait 360 millisecs
   close stack save
end savenotes

when i went back to document it I stumbled across a sort of confusion in my
understand



change your code as follows to resolve this for yourself ;-)

on savenotes
   modeless stack save
   answer Saving  (the short name of this stack) -- just to know
   save this stack
   wait 360 millisecs
   close stack save
end savenotes

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


Re: what's this stack

2010-11-15 Thread Mark Smith


Jonathan Lynch wrote:
 
 Is one stack a substack of the other? If so, both are saved together.
 
 

yes, save is a substack used only as an alert. So save this stack saves
the parent or primary stack and all substacks. Thanks



-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/what-s-this-stack-tp3042392p3043183.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: what's this stack

2010-11-15 Thread Mark Smith


Robert Brenstein wrote:
 
 change your code as follows to resolve this for yourself ;-)
 
 on savenotes
 modeless stack save
 answer Saving  (the short name of this stack) -- just to know
 save this stack
 wait 360 millisecs
 close stack save
 end savenotes
 
 Robert
 
 

And of course, I was wondering exactly how to do that so thank you :-)

-- mark
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/what-s-this-stack-tp3042392p3043196.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: what's this stack

2010-11-15 Thread Mark Smith


Robert Brenstein wrote:
 
 change your code as follows to resolve this for yourself ;-)
 
 on savenotes
 modeless stack save
 answer Saving  (the short name of this stack) -- just to know
 
 

Interesting, when I put the answer line in the notepad stack script I get
saving notepad. But when I put it into the save substack it says saving
save. I couldn't find a way for the save substack to say saving notepad
and saving save looks dumb. So, yes, I know now which stack is being saved
but how do I let the user know? One idea (not tested) is to put a blank
label in the save stack and then try and put the Saving  stuff into the
save stack label. I think i'll give that a try and let you know how it
works.

-- M
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/what-s-this-stack-tp3042392p3044122.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


what's this stack

2010-11-14 Thread Mark Smith

Hi, I recently wrote this code which works fine

on savenotes
   modeless stack save
   save this stack
   wait 360 millisecs
   close stack save
end savenotes

when i went back to document it I stumbled across a sort of confusion in my
understand

on savenotes
   modeless stack save -- opens a new stack save as a modeless window
   save this stack  -- saves this stack. Which stack is this (save or
notepad)?
   wait 360 millisecs
   close stack save
end savenotes

I suddenly realized that I was using the save this stack command with 2
stacks open, the primary stack called notepad and a secondary stack called
save.

It appears that rev knows which is which even thought from the code it is
quite confusing. Would it be better to say save stack notepad instead?

Thanks

-- Mark

-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/what-s-this-stack-tp3042392p3042392.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: what's this stack

2010-11-14 Thread jonathandlynch
Is one stack a substack of the other? If so, both are saved together.

--Original Message--
From: Mark Smith
Sender: use-revolution-boun...@lists.runrev.com
To: use-revolution@lists.runrev.com
ReplyTo: How to use Revolution
Subject: what's this stack
Sent: Nov 14, 2010 8:35 PM


Hi, I recently wrote this code which works fine

on savenotes
   modeless stack save
   save this stack
   wait 360 millisecs
   close stack save
end savenotes

when i went back to document it I stumbled across a sort of confusion in my
understand

on savenotes
   modeless stack save -- opens a new stack save as a modeless window
   save this stack  -- saves this stack. Which stack is this (save or
notepad)?
   wait 360 millisecs
   close stack save
end savenotes

I suddenly realized that I was using the save this stack command with 2
stacks open, the primary stack called notepad and a secondary stack called
save.

It appears that rev knows which is which even thought from the code it is
quite confusing. Would it be better to say save stack notepad instead?

Thanks

-- Mark

-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/what-s-this-stack-tp3042392p3042392.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Sent from my Verizon Wireless BlackBerry___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution