2 questions

Frank D. Engel, Jr. fde101 at fjrhome.net
Mon Feb 28 09:44:46 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rev allows you to work with multiple open stacks, and with stacks which 
are not even open.

The stack currently visible to the user does not have to be the one 
that your script is currently working with.  Rev has the concept of a 
"defaultStack", which is the stack your script works with when you do 
not otherwise specify a stack, and some actions only work on the 
defaultStack.  You can choose a defaultStack just by setting the 
defaultStack property to the name of the stack you want to work with:

set the defaultStack to "my data stack"


If you want to remember the current defaultStack in order to return to 
it after doing whatever you are trying to do:

put the defaultStack into oldDefault
set the defaultStack to "my data stack"

<...do stuff...>

set the defaultStack to oldDefault


Thus you can do anything with any of the other stacks that you can do 
with the main stack(s).  There is no concept of a main stack for an 
"application" or any such thing (Rev does not think of things on an 
Application or Program level, only on a stack level), so all main 
stacks are treated equal, and there are only somewhat minor differences 
for substacks (additional stacks stored in the same file as a single 
main stack; the script of the main stack is late in the message path of 
each of its substacks).

Under the "Topics" area of the Rev docs, look at "Main stacks, 
substacks, and the organization of a stack file" for more info.  Also 
see the defaultStack property (look in the dictionary for this one).

Note that only an open stack can be a defaultStack, but that a stack 
need not be visible to be open.

You can open a stack from another file without showing it on the 
screen, check the docs for the "go" (or "open") command in the 
dictionary section of the Rev docs for more info.


On Feb 27, 2005, at 5:06 AM, Rob Meijer wrote:

> Hi Mark
>
> At 08:24 27/2/2005, Mark Wieder wrote:
>> If I understand what you're trying to do here, the following will
>> create a new card at the end of substack "addressdata":
>>
>> push card -- called from mainstack
>> go to last card of stack "addressdata"
>> create card "whatever"
>> pop card -- return to mainstack
>
> what a funny way to use push and pop.
> In TB this means quite something else.
> After te card "whatever" is created, can I
> use global variables from the main stack
> and can I pop all data from the mainstack
> into the various fields on that whateverCard?
>
>
>> RM> You may use a viewer to show a (part of) a page,
>> RM> where you want to see special data: f.i. one user
>> RM> wanted to see what product was the most lucrative,
>> RM> so he opens a viewer, showing a part of a page
>> RM> where that list was placed:
>>
>> So your page data is larger than the displayable card screen space?
>> There's been some discussion on this list lately about this, but
>> personally I prefer to create a different card for each view, populate
>> the card with info from the source data card, then display the view
>> card for the user. The lock screen command is very handy for this:
>
> I can give a viewer each dimension I want and I can
> place it everywhere on the screen: a childviewer stays in the window,
> a popupviewer has no limitationson the screen.
>
>> lock screen
>> go to card "Cost Analysis"   --why not going directly to card 
>> whichProduct
>> put field "unit cost" of card whichProduct into field "unit cost"  
>> ---what card "unit cost" is this, samestack?
>> put field "widgets" of card whichProduct into field "widgets"
>> unlock screen
> So what has happened now?
>
> I am very sorry,but this goes beyond my imagination.
> I am not revolutionary enough yet.
>
> The scripting for a viewer is so easy, because every varaible
> used in the script keeps its value when you start writing
> the viewer part.
> Example: in the script of button "store" of the intakeCard of
> the main stack, I put all texts of the fields in a textline.
> In the routine I showed in my last posting, I cab use the word
> textline again !
> But be aware that the viewer is for more than just adding a card:
> everything you can do in the main stack, you can do in each stack
> on your computer.
>
> Rob
>
>
> robmeyer at hetnet.nl
> www.japrosoft.com
> no more spam: Mailwasher Pro
> http://www.firetrust.com/products/pro/
> and please mention my emailaddress...  
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
- -----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCIy5e7aqtWrR9cZoRAnE2AJ4gGSfPxsC+1OFbHUH8rwUj+/9c1QCeIMjg
DVwOaZYyHPxytUOVKzxNheI=
=yLZ5
-----END PGP SIGNATURE-----



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the use-livecode mailing list