Where are the objects of a stack after 'start using'?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sun Aug 24 17:34:56 EDT 2008


Bonjour Graham,

A library is a collection of handlers put in a stack's script only.  
The purpose of a library is to make some particular code routines  
available (text, menu, etc.).
Usually, a library is a 'blank' stack with a single card and no control.
Just the script of the stack is used and made available from any  
other script of any stack (card, controls, etc.) by putting the stack  
'in use'.

It seems that you need a component and not a library:
Why don't you create a registering stack you'll make a substack of  
any project when needed?
In addition, you can add some code at preOpenstack to pick up some  
values from your mainstack (or elsewhere) then parameter your  
registering stack to suit any project.

Le 24 août 08 à 22:56, Graham Samuel a écrit :

> Thanks Richard for your reply. As you can see, I am stumbling a bit  
> over this, feeling my way. I would like to cut down on the  
> experiments which is why I'm asking questions on this list.
>
> Thanks very much for the reference to your article. I think I do  
> understand the Rev message path, and I thought I understood that with
>
> start using stack "someStack"
>
> the script of the **stack** (but not any controls it might contain)  
> gets inserted into the path so that handlers in the script are  
> accessible to all the stacks in the application. But to me that  
> didn't mean that the stack was open for business, so to speak. I  
> mean if the stack has a multiplicity of cards and controls, all  
> with their own scripts, where do these scripts go in the message  
> path, and can the controls be activated?
>
> To give an example of what I am trying to do: I have a number of  
> applications which all use the same method of registration of a key  
> - I want the user to  have the same visual experience for each one,  
> as well as my app running a script with the same algorithm for each  
> one. So I want this whole registration process, scripts, cards,  
> buttons and all, to be a re-usable component, i.e. a library. I  
> don't think 'start using' covers this. My question therefore is,  
> what is the best way of creating re-usable components other than  
> scripts, in Rev?
>
> Sorry if I am being dumb about this.
>
> Graham


Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list