Changeset 22576

Show
Ignore:
Timestamp:
10/15/07 15:56:05 (13 months ago)
Author:
nielx
Message:

Some improvements suggested by Axel. Thanks.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/docs/user/app/_app_messaging.dox

    r22350 r22576  
    1414        framework is the basis for the efficient multithreaded Haiku applications, 
    1515        because it solves one of the fundamental issues of multithreading: it 
    16         allows you to easily and securely communicate between threads. But the 
    17         framework goes even further: it allows inter-application communication! 
     16        allows you to easily and securely communicate between threads. The 
     17        framework allows inter-application messaging as well as  
     18        intra-application messaging, and it will always use the most effective 
     19        mechanism for the communication automatically. 
    1820         
    1921        This page will introduce you to the subject of messaging. It is meant as a 
     
    4042          keeps track of different sorts of data. BMessage provides many convenient 
    4143          Add*() methods, for example BMessage::AddBool(). With the corresponding 
    42           Find*() method (in this example, FindBook()) you can retrieve the data. 
     44          Find*() method (in this example, 
     45          \link BMessage::FindBool(const char *, int32, bool *) const FindBool() \endlink) 
     46          you can retrieve the data. 
    4347 
    4448        BMessage itself is generic, its syntax and semantics are determined by the 
     
    5155        Objects of the BLooper type are objects that run message loops. Every 
    5256        object runs in its own thread. The BLooper objects continually check for 
    53         incoming messages, and they try to find a BHandler to actually handle the 
    54         messages within their thread context. Message handling within a thread is 
    55         synchronous. 
     57        incoming messages. To process the messages, the looper looks for message 
     58        handlers that handle the messages within the thread's context. Message 
     59        handling within a looper is synchronous. 
    5660         
    5761        BLooper inherits BHandler, the base class for message handling. However, it 
     
    102106        the parent class.  
    103107         
    104         \warning Don't forget to actuall call  
    105                 <em>baseclass</em>::MessageReceived(). Failing to do this will mean 
    106                 that the message chain will not completely be followed, which can lead 
    107                 to unhandled messages. There might be some internal system messages 
    108                 that the Haiku API classes handle, and not actually handling these 
    109                 messages could lead to inconsistent internal behavior. 
     108        \warning Don't forget to actuall call the MessageReceived() method of the 
     109                base class. Failing to do this will mean that the message chain will 
     110                not completely be followed, which can lead to unhandled messages. There 
     111                might be some internal system messages that the Haiku API classes 
     112                handle, and not actually handling these messages could lead to 
     113                inconsistent internal behavior. 
    110114         
    111115        \subsection app_messaging_overview_bmessenger BMessenger 
     
    139143          to BLoopers to filter all incoming messages, or to BHandlers to filter 
    140144          messages that could be handled by that object. The filter object can be 
    141           subclassed and extended by overriding the Filter() method. 
     145          subclassed and extended by overriding the \link BMessageFilter::Filter()  
     146          Filter() \endlink method. 
    142147 
    143148        \section app-messaging-receiving Receiving Messages