From 6fd8b07afce51fc741e30c42a390eb8381dc2daa Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Thu, 27 Dec 2007 13:30:30 +0000 Subject: [PATCH] Add a note about using messages for data storage. Thanks to mlotz for telling me this functionality was underexposed in the current docs. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23170 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- docs/user/app/Message.dox | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/user/app/Message.dox b/docs/user/app/Message.dox index 1899b70ce6..d6b724f7bb 100644 --- a/docs/user/app/Message.dox +++ b/docs/user/app/Message.dox @@ -95,17 +95,24 @@ This class is at the center of the web of messaging classes, in the sense that it defines the actual structure of the messages. Messages have two - important elements: the #what identifer, and the data members. The first - can be directly manipulated, the latter can be manipulated through + important elements: the #what identifer, and the data members. The + first can be directly manipulated, the latter can be manipulated through AddData(), FindData() and ReplaceData() and their deratives. Neither of these elements are mandatory. - The second important role of BMessage is that it stores meta data: who sent - the message and with what intention? The methods of BMessage will disclose - if the message was a reply (IsReply()), where it came from + The second important role of BMessage is that it stores meta data: + who sent the message and with what intention? The methods of BMessage will + disclose if the message was a reply (IsReply()), where it came from (IsSourceRemote()), whether a reply is expected (IsSourceWaiting()), and in case the message is a reply, what it's a reply to (Previous()). + Mostly, messages are used to pass information between the the objects in + your application, but because messages are such flexible data containers, + they are also often used for other data storage purposes. Many + applications store their settings as messages. Because messages can be + flattened to data streams (such as files), they provide an easy but + powerful tool for data storage. + All methods can be classified in these areas: - Adding, Finding, Replacing and Removing Data. - Statistics and Miscelanous information.