Front scripts vs Behaviors
Peter Haworth
pete at mollysrevenge.com
Thu Aug 12 11:33:15 EDT 2010
Yep, the group=table/control=column model seems to work really well.
I'm considering making all the handlers for it available once I've
resolved the front script/behavior issue and tidied up the code.
On the message path issue, I just meant ti wouldn't reach the target
following the normal message path. The model you showed using
dispatch is just what I need.
Pete
On Aug 11, 2010, at 9:01 PM, use-revolution-request at lists.runrev.com
wrote:
> Message: 9
> Date: Wed, 11 Aug 2010 11:43:23 -0700
> From: Mark Wieder <mwieder at ahsoftware.net>
> Subject: Re: Front scripts vs Behaviors
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <95697085765.20100811114323 at ahsoftware.net>
> Content-Type: text/plain; charset=us-ascii
>
> 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