home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / oop / macapp3 / 195 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.7 KB

  1. Path: sparky!uunet!stanford.edu!apple!applelink.apple.com
  2. From: DIGIMATCH@AppleLink.Apple.COM (3M, Ran Bedekar,PRT)
  3. Newsgroups: comp.sys.mac.oop.macapp3
  4. Subject: Re: Adlib Questions
  5. Message-ID: <724432192.5795589@AppleLink.Apple.COM>
  6. Date: 15 Dec 92 15:01:00 GMT
  7. Sender: daemon@Apple.COM
  8. Organization: AppleLink Gateway
  9. Lines: 27
  10.  
  11. Chip,
  12. The 'BHVR' resource that Ad Lib creates is pretty simple.  It's a count (2
  13. bytes) followed by one or more behaviors.  TBehaviorApp::IBehaviorApp() (source
  14. provided with Ad Lib) converts each resource in your app to a stream and reads
  15. the behaviors.
  16. If there are multiple behaviors in the resource, they will all be added to the
  17. application object.  Likewise, if there are multiple BHVR resources, they all
  18. are added to the application.
  19.  
  20. Having said all of that, I don't think that it is your problem.  The 'BHVR'
  21. resource is a general purpose mechanism to add any kind of behaviors to your
  22. application object.  For your prototyping, you are adding THandlerBehaviors to
  23. objects by using the 'Handlers' window in Ad Lib.  There is no reason why
  24. multiple handler behaviors will not work, if they are set up properly.  I
  25. suspect that one of your handlers is blocking a message by not forwarding it.
  26. For each message that you provide a handler for (e.g., Key Down or Setup Menus)
  27. you can specify a number of actions (e.g., Send Event or Enable Menu) to be
  28. performed.  Normally, the last action should be 'Forward Message' to 'Self'.
  29. This will let the object that owns the behavior, and the object's other
  30. behaviors, have a shot at the message.  If you don't forward the message, it
  31. will not be propagated.  This is analogous to calling the inherited member
  32. function when overriding a class.
  33.  
  34.  
  35. Regards,
  36. Nick Nallick
  37.  
  38.