klaus at major-k.de
Mon Feb 28 12:09:31 CST 2005
> Frank and everybody
> Thank you very much. I have read the topics, but being a recrute on
> the revolutionary field,
> it still is too difficult fior me. Moreover RevDoc has a lack of good
> and practical examples,
> so I have to find my way with trial and error.
> Nevertheless I have 2 questions.
> I builded a stack and a substack. The substack "frontpage" is larger
> than the mainstack:
> I call the stack that opens "the mainstack". Right? The mainstack is
> called "pages".
> On the frontpage there is a field "content", registering the name of
> each page, everytime
> the frontpage is entered.The "frontpage" has a larger size than the
> cards in "pages".
> To execute the registering of the pages, there is a handler called
> "fillfield" in the stackscript.
> Because this handler has to become active when entering the frontpage,
> I put "send fillfield"
> in the cardscript of "frontpage" with on opencard:
> This handler does not react when entering the Frontpage.
> The only way to get the handler active is to put "send fillfield" in a
> navigationbutton of the
You have a handler in the stack script of stack "frontpage" called
"fillfield" and want it to be executed
everytime a card is opened?
In that case put this into the stack script, too:
## or preopencard
## no need to SEND anything!
> How to call a handler in a substack?
> Question 2.
> In the stackscript I wrote:
> function content
> return "field" &"e&content"e&& "of stack"
> end content
> returning: field "content" of stack "frontpage"
Yeah, this will return this STRING: field "content" of stack
No quotes needed:
return fld "content" of CD X of stack "frontpage"
Please note the exact identifier "...of CARD xxx of stack..." might be
if the object is not on the CURRENT card of that stack!
> The number of lines in field "content" = 89
> but: put the number of lines of content() puts 1
> but: put the number of lines of field "content" of stack "frontpage"
> puts 89
> What did I do wrong with the function function.
See above, too much quotes :-)
To call a function of another stack do this:
put value("name_of_function()",stack "frontpage") into myVar
...value("name of function(params...)", exact description where the
Hope that helps.
> robmeyer at hetnet.nl
> no more spam: Mailwasher Pro
> and please mention my emailaddress...
klaus at major-k.de
More information about the use-livecode