[interfacekit] BHandler::StopWatchingAll()
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: "OpenBeOS Interface Kit" <interfacekit@xxxxxxxxxxxxx>
- Date: Mon, 21 Oct 2002 03:53:22 +0200 CEST
Another issue with the BHandler observer stuff.
BHandler::StopWatchingAll() isn't correctly implemented in BeOS; it
will just remove the notification state -1.
OTOH StartWatchingAll() will just add the notification state -1.
I would remove all states and replace them with -1 for
StartWatchingAll(), and always remove anything for StopWatchingAll() -
the BeBook states this functionality:
-----
StartWatchingAll()
registers the specified BMessenger or BHandler to be notified when any
of the
notifer's states change.
StopWatchingAll(), by
some odd coincidence, stops all monitoring by the BHandler or
BMessenger
specified by watcher.
-----
They even make jokes when the function doesn't do what it should ;)
I just changed the Tracker sources to the correct usage of the
notification model, and also replaced calls to StopWatchingAll() by
calls to remove every single notification to get this right - and it *
still* works... (I really have no idea what made the old version work).
Adios...
Axel.
- Follow-Ups:
- [interfacekit] Re: BHandler::StopWatchingAll()
- From: Ingo Weinhold
Other related posts:
- » [interfacekit] BHandler::StopWatchingAll()
- » [interfacekit] Re: BHandler::StopWatchingAll()
- » [interfacekit] Re: BHandler::StopWatchingAll()
- [interfacekit] Re: BHandler::StopWatchingAll()
- From: Ingo Weinhold