Re: Messages and Scope
At 6:30 PM -0700 5/28/2001, Robin-David Hammond wrote: >so if you click on a button , and there is no mouseDown handler, but the >CARD to >which it belongs had a mouseDown handler, then the card handler is used. > >so far so good. messages pass from objects to those objects that contain it >until one of them contains a handler that does not call the pass procedure. > >i created a an object (a group of 3 atomic graphical elements) and gave it a >script. the object had clearly defined boarders. the script included a >mouseDown >handler. clicking ANYWHERE on the card called that objects handler. > >Is this defined as correct behavior? Yes. Groups on a card are placed in the message path of objects on that card, just before the card. In other words, if you click the card, mouseDown passes through the card, then any groups on the card, then the stack, and so on. If you want the message to affect only the objects in the group, you can include in your handler a line such as if the owner of the target is not me then passs mouseDown to filter out objects that aren't part of the group. -- Jeanne A. E. DeVoto ~ [EMAIL PROTECTED] http://www.runrev.com/ Runtime Revolution Limited - Power to the Developer! Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Messages and Scope
- Original Message - From: "Robin-David Hammond" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 28, 2001 6:30 PM Subject: Messages and Scope > > In the documentation > > metaTalk Reference (111) > Messages by Object : > Not that objects that contain other objects can get messages from any of these > objects, because if a message is not handled by an objects script, it is passed > up to its owner. > > so if you click on a button , and there is no mouseDown handler, but the CARD to > which it belongs had a mouseDown handler, then the card handler is used. > > so far so good. messages pass from objects to those objects that contain it > until one of them contains a handler that does not call the pass procedure. > > i created a an object (a group of 3 atomic graphical elements) and gave it a > script. the object had clearly defined boarders. the script included a mouseDown > handler. clicking ANYWHERE on the card called that objects handler. > > Is this defined as correct behavior? In the HyperCard model, each card resides in a background. Since this is the model upon which MC is based, I assume it uses the same object hierarchy model (even though MC bkgnds are different animals from HC bkgnds). That's why I would say you're experiencing correct behavior from MC. Supporting evidence: if you have a stack where a given bkgnd is shared by more than one card, open it and type in the message box: answer the number of cards in bg 1 Regards, Phil Davis > > thankyou > > robin-david hammond > > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Messages and Scope
In the documentation metaTalk Reference (111) Messages by Object : Not that objects that contain other objects can get messages from any of these objects, because if a message is not handled by an objects script, it is passed up to its owner. so if you click on a button , and there is no mouseDown handler, but the CARD to which it belongs had a mouseDown handler, then the card handler is used. so far so good. messages pass from objects to those objects that contain it until one of them contains a handler that does not call the pass procedure. i created a an object (a group of 3 atomic graphical elements) and gave it a script. the object had clearly defined boarders. the script included a mouseDown handler. clicking ANYWHERE on the card called that objects handler. Is this defined as correct behavior? thankyou robin-david hammond Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.