Target not working???
dburgun at dsl.pipex.com
Mon Mar 27 06:53:18 EST 2006
On 27 Mar 2006, at 11:43, Mark Smith wrote:
> The target of the 'start using' <is> stack TestLib, no?
I'm not sure and a bit confused! But from just experimenting with
Target a bit more, yes, you are right.
Yes, that seems like another way to do it.
I would like to scan the script(s) of the stack that just did the
"start using" and was hoping that I could do it without an additional
call to the library, since it's a bit error prone and it's better
practice anyway to do it in the "libraryStack" hanlder.
I could also use a Global and clear it after use, as in:
if gISMStackName = empty then
stop using "/Users/Dave/Desktop/TestLib/Lib.rev"
throw " gISMStackName not set"
put "libraryStack" & cr after field 1 of me
put gISMStackName after field 1 of me
put cr & cr after field 1 of me
select after field 1 of me
put empty into gISMStackName
Then in the stack that does the "start using" do this:
put the long name of this stack into gISMStackName
-- put empty into gISMStackName --Uncomment to test the
start using "/Users/Dave/Desktop/TestLib/Lib.rev"
I'd have to do something similar in the releaseStack handler too.
Not sure what the best way to do this is? What do you think?
All the Best
More information about the Use-livecode