A tip when using externals and cloning stacks

Jan Schenkel janschenkel at yahoo.com
Wed Aug 13 08:57:04 EDT 2003


Hi All,

Just thought I'd save someone else days of searching
and experimenting by handing out this tip -- even if
not many may find themselves in this sort of
situation.

Here's the deal :
- my app edits xml documents, in a multiple document
interface ; to this end, it clones a certain substack
of my mainstack ; these clones are the editor stacks
in what follows
- because there are certain other stacks that need to
be called as sheets from these editor stacks, I clone
these as well, and make the clones substacks of the
editor stack
- after the nhecessary stacks are cloned and the
mainstacks set, I send the editor stack a message that
triggers it to read the xml file, build a tree and
prepare for edit.
- so far so good ; the thing is that I didn't have any
problem inside the Revolution IDE, but once compiled
it didn't build the tree and I didn't get a warning
even though I had included error reporting in the
distribuilder

After a lot of searching and experimenting, I found
that because the editor stacks were no substacks of my
app's mainstack, they had no access to the revXML
library, even though it had loaded correctly, as other
parts worked just fine.

Some more experimenting led me to setting the editor
stack's externals at preOpenStack (the earliest
message it could get) to 'revxml.dll', but that meant
that the externalFunctions were still unavailable.

In the end I just moved all the XML logic to another
spot, within my app's mainStack. Now it all runs fine.
Still strange to see that the editor stacks didn't
have access to the externals that were loaded in
memory. [*]

Hope this helps someone...

Jan Schenkel.

[*] May I add a supporting vote to the enhancement
request with Bugzilla ID 331 ?
<http://www.runrev.com/revolution/developers/bugdatabase/show_bug.cgi?id=331>
Thanks in advance :-)

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the use-livecode mailing list