Need some help figuring out how to use a library
Rob Cozens
rcozens at pon.net
Mon Jan 13 12:19:01 EST 2003
>Is there some documentation on how to copy libraries from one stack to
>another or can someone tell me how to do so for libSMTP ?
Without have looked at Shao Sean's example, I can only give you
general thoughts:
A library stack, as traditionally viewed, is a container of handlers
(in the stack script) and resources (eg: images). The handlers &
resources in library X.rev are available to any control/handler in
any stack that includes 'start using stack "X.rev"' before using
them. (FYI, stack "X.rev" receives a libraryStack message when it is
placed in use.)
Multiple stacks can be in use at any time, and their order in the
message path is the reverse order of their receipt of libraryStack
messages (ie: the last stack to receive libraryStack is first in the
message path among stacks in use.
Here's a sample from SDB_Utilities' preOpenStack handler:
get the effective fileName of me
set the itemDelimiter to "/"
put "Serendipity_Library.rev" into the last item of it
if there is a stack it then start using stack it
else
if the platform is "Win32" then
get specialFolderPath("Documents")&"/Serendipity_Library.rev"
if there is a stack it then then start using stack it
else
beep
answer "Please install the
file,"&"e&"Serendipity_Library.rev""e&&"in my folder and try
again."
close this stack
exit preopenStack
end if
else
beep
answer "Please install the
file,"&"e&"Serendipity_Library.rev""e&&"in my folder and try
again."
close this stack
exit preopenStack
end if
end if
--
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list