Listen for messages in FrontScripts

Pete pete at mollysrevenge.com
Tue Jan 3 16:40:12 EST 2012


OK, sorry didn't realise you'd already read it.  You're turning up some
interesting stuff.  I guess my only comment is that I prefer to always
specify a target for dispatch, etc. Defaults are great  but being specific
relieves my already overloaded brain of having to remember what they are!.
Pete

On Tue, Jan 3, 2012 at 12:30 PM, Todd Geist <todd at geistinteractive.com>wrote:

> Thanks Pete, That is where I began :-)
>
> On Tue, Jan 3, 2012 at 12:22 PM, Pete <pete at mollysrevenge.com> wrote:
>
> > I think it's time to refer to the message path bible - Richard Gaskin's
> > great article at
> > http://www.fourthworld.com/embassy/articles/revolution_message_path.html
> > Pete
> >
> > On Tue, Jan 3, 2012 at 12:01 PM, Todd Geist <todd at geistinteractive.com
> > >wrote:
> >
> > > On Tue, Jan 3, 2012 at 10:09 AM, Bob Sneidar <bobs at twft.com> wrote:
> > >
> > > > If I am not mistaken, sent or dispatched messages are always sent to
> > the
> > > > card if another target is not specified,
> > >
> > >
> > > hmm, Not what I see
> > >
> > > Send, dispatch, and call use the current object as the target if none
> is
> > > specified. It would only be the card if the card was the object sending
> > the
> > > command. Throw this in a button,
> > >
> > > *on* mouseUp
> > >
> > >   *send* test
> > >
> > > *end* mouseUp
> > >
> > >
> > > *on* test
> > >
> > >   *put* the target
> > >
> > > *end* test
> > >
> > >
> > > When you click the button you will see that the message is handled by
> the
> > > object.
> > >
> > >
> > > If you send a message using *Any* form (send, dispatch or call) and do
> > not
> > > specify a target, then the object that is sending (or  calling or
> > > dispatching)  the message is the target.  Of course a front script is
> > > inserted before the target and can handle the message, BUT it is not
> "the
> > > target".
> > >
> > >
> > > Here is my current understanding of the differences in Send, Dispatch,
> > and
> > > Call. If anyone could correct me, I would appreciate it.
> > >
> > >
> > > I think dispatch does switch contexts.  It send the message to the
> object
> > > and it is processed along the normal message path.  It does have a
> > special
> > > use of the "me" object which can refer to a behavior. But other than
> > that I
> > > am pretty sure that references are evaluated in the context of the
> > > receiving object, not the sending one.
> > >
> > >
> > > Send is different because messages not handled but the target DO NOT
> > > continue down the message path.  Send does NOT resolve "me" to the
> > behavior
> > > script if there is any. Like Dispatch the context is the receiving
> > object,
> > > not the sending one.
> > >
> > >
> > > Call is really weird. Context is the CALLING object not the Sending
> > object.
> > > And messages that are not handled by the target pass down that object's
> > > message Path.
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > > Todd
> > >
> > > --
> > > Todd Geist
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode at lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > >
> > >
> >
> >
> > --
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
>
> --
> Todd Geist
>
>
> (805) 419-9382
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list