Front scripts vs Behaviors

Mark Wieder mwieder at
Wed Aug 11 14:43:23 EDT 2010


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.

on mouseUp
  dispatch doMouseUp to me
end mouseUp

on doMouseUp
 -- change contents of another field
end doMouseUp

on doMouseUp
 --  recalculate totals
end doMouseUp

on doMouseUp
 --  stuff like that
end doMouseUp

-Mark Wieder
 mwieder at

More information about the Use-livecode mailing list