Front scripts vs Behaviors
Mark Wieder
mwieder at ahsoftware.net
Wed Aug 11 14:43:23 EDT 2010
Peter-
Wednesday, August 11, 2010, 10:01:05 AM, you wrote:
> interface between controls on cards and my sqlite database. Groups on
> the card are tied to a db table and controls in the group are tied to
> columns in the table related to the group.
Cool. I've thought of doing something like that.
> If I switch over to behaviors (and I'm inclined to do that) I need a
> way to handle this "local" logic since, as you say, the messages wont;
> ever make it to the actual control, but I still need the database
No, I did *not* say that (or at least didn't mean that). Messages
won't get passed farther down the path (card, stack, backscripts...)
*unless* you do something yourself. If you have a handler (e.g.,
mouseUp) in the behavior button and not in the target button you can
use the dispatch message in the behavior button to pass a message to
the target.
behavior:
on mouseUp
doSomething
dispatch doMouseUp to me
end mouseUp
target1:
on doMouseUp
-- change contents of another field
end doMouseUp
target2:
on doMouseUp
-- recalculate totals
end doMouseUp
target3:
on doMouseUp
-- stuff like that
end doMouseUp
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list