[interfacekit] Re: BHandler::fToken

  • From: DarkWyrm <bpmagic@xxxxxxxxxxxxxxx>
  • To: interfacekit@xxxxxxxxxxxxx
  • Date: Thu, 06 Mar 2003 20:23:14 -0500

>That could in principle be safe. If the need arises to have a means to
>check whether the pointer is still valid, BTokenSpace could be extended to
>provide a reverse mapping. Then one can be sure, that the pointer at least
>refers to a valid BHandler, dynamic_cast it to a BView*, and an
>invocation of Window() will reveal whether it's indeed a BView belonging
>to the window.
Not a bad idea. I've got a token handler in place for server tokens of 
various sorts already, but I'm definitely going to keep this in mind for an 
optimization down the road.

>That may be right. I wonder nevertheless, how e.g. a B_MOUSE_DOWN message
>is sent, and by whom.
It starts in the Input Server, which sends it to the App Server. The App 
Server figures out who should get the message and then sends it to the 
appropriate BWindow. 

--DW


Other related posts: