Refresh Table after editing record in another stack - bumped

Sarah Reichelt sarah.reichelt at gmail.com
Wed Jan 30 00:46:30 EST 2008


> Which gets me back to: how do I call a script in a parent stack from a
> substack?
> I'm trying this now and I get an error: handler not found. I'm assuming the
> substack doesn't know the script in the parent stack exists. Is this where
> you have to put scripts into the FrontScripts? Not sure.

It depends where the handler is in the parent stack. If it is in the
mainStack's stack script, then it will be available to all other
stacks. If it is in the mainStack's card script or in an object's
script, then it will not be available directly, but you can do
something like:

send "updateTable" to button "Update" of stack "Whatever"

I only use a frontScript if I need to intercept messages, e.g. if I
have a commandKeyDown handler or something similar that I want to grab
all commandKeys before they get to any other stack. If you have a
library stack and you want to make all the handlers in that stack
script available to every other stack, then you can go with "start
using".

One thing to watch for: I often get that "handler not found" error
when I have tried to use a function as a handler.

>
> P.S.
> I populate my table field lists with the revDataFromQuery command.
> If you don't use table fields, what do you use to display lists in?

Just normal scrolling fields. I never turn on the "Table" setting.

Cheers,
Sarah



More information about the use-livecode mailing list