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

Graham Samuel livfoss at mac.com
Sun Aug 24 16:56:27 EDT 2008


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

On 2Sat, 23 Aug 2008 11:48:10 -0700, Richard Gaskin <ambassador at fourthworld.com 
 > wrote:
>
> Graham Samuel wrote:
>> I am trying to construct a library by writing stacks and
>> inserting their scripts into the message path with 'start
>> using'. So far, so good. Then I wanted to set a custom prop
>> in a library stack, and RunRev silently rejected this, presumably
>> because the stack although being used, wasn't in the 'stacks in
>> use'. Confusing, isn't it?
>
> This may be a case of "Check your premise". :) How do you know the  
> stack
> isn't in the "stacksinuse"?  And how is it not there is "start using"
> was successful?
>
> Have you checked "the result" immediately after "start using"?  You  
> may
> find your clue there.
>
>
>> What if I want the objects in a library stack to be available to
>> my application? How do I create a library of objects? I obviously
>> don't understand how the whole 'start using' thing works.
>
> For general info on libraries and related topics, this article may  
> help:
>
>
>   Extending the Runtime Revolution Message Path
>   An introduction to using Libraries, FrontScripts, and BackScripts
>   in Runtime Revolution's Transcript Programming Language
>
> <http://www.fourthworld.com/embassy/articles/revolution_message_path.html 
> >
>
>
>> Can I do 'start using' and afterwards actually go to or open my
>> library stack so that its objects and properties become public
>> property so to speak?
>
> Yes, although it may not be necessary since the stack is already in
> memory.  My libROSE stack (Rev Open Source Editor) works that way,
> setting properties on a template script editor stack even though it's
> never actually opened.
>
> Perhaps there's something in the code which refers to the stack in
> question which may be off, or the stack isn't really in use as  
> suggested
> above.




More information about the use-livecode mailing list