[interfacekit] Re: Object token -> Object, restoring focus...

On 2004-12-27 at 15:22:22 [+0100], Stefano Ceccherini wrote:
> > In the private part of the App Kit there is a class BTokenSpace and a
> > global instance gDefaultTokens which manages the BHandler tokens of the
> > application. BTokenSpace::GetToken() fed with the token and token type
> > B_HANDLER_TOKEN returns the respective BHandler* (as void* through the
> > third argument). The callback is usually omitted.
> 
> Thank you very much: that helped (as you can see by the last commit).
> 
> BTW, shouldn't be there a static GetHandlerForToken(int32) function in 
> Handler.h
> ? At least, I would see it as a nice addition.
> 
> Or maybe it's not useful to the "normal" developer, but since we have 
> already
> _get_object_token()....

I would prefer getting rid of things like _get_object_token_() completely 
and instead introduce an inner friend class BHandler::Private that exposes 
the private parts of BHandler needed elsewhere (as done with BRoster). This 
would also be a good place for a static BHandler *HandlerForToken(int32 
token) method.

CU, Ingo

Other related posts: