[interfacekit] Re: BMessageQueue::RemoveMessage problem.

OK then... nice to know...

> He is right, the BeBook is wrong in this case.  I wrote BMessageQueue and
created the use
> cases and unit tests for it.  You can see that I document this deviation
from the BeBook
> here in CVS here:
>
> current/docs/develop/app/usecases/BMessageQueueUseCases.html
>
> Perhaps this detail should have been listed in comments in the code itself
also.
>
> BTW, I did some coding for the interface kit in the past (BLocker,
BAutolocker, a couple
> of others), but I don't really have time to chip in now.  But I monitor
the emails still,
> compile the code.  Perhaps I will find the time to get back into it again.
In the
> meantime, do let me know if there is a problem with anything I have
contributed.  Thanks.
>
>
> On Jul 12, "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx> wrote:
> >
> > On Wed, 16 Oct 2002 12:01:52 +0300 "Adi Oanca" <adioanca@xxxxxxxxxxxxx>
> >  wrote:
> > > Hi ALL!
> > >
> > > The BeBook says:
> > > -------------------------------------
> > >       AddMessage() , RemoveMessage()
> > >               void AddMessage(BMessage *message)
> > >               void RemoveMessage(BMessage *message)
> > >
> > >
> > >   AddMessage() adds message to the far end of the queue.
> > > RemoveMessage()
> > > removes a particular message from the queue and deletes it.
> > > ------------------------------
> > >
> > > *deletes* IT! In our implementation the message isn't deleted! The
> > > one
> > > responsable with BMessageQueue, please fix that!
> >
> > I don't think, the BeBook tells the truth here.
> >
> > CU, Ingo
> >
> >
> > // message-queue-test.cpp
> >
> > #include <stdio.h>
> >
> > #include <Message.h>
> > #include <MessageQueue.h>
> >
> > class MyMessage : public BMessage {
> > public:
> > MyMessage() {}
> > virtual ~MyMessage() { printf("MyMessage::~MyMessage()\n"); }
> > };
> >
> > int
> > main()
> > {
> > MyMessage *message = new MyMessage;
> > BMessageQueue queue;
> > printf("adding message...\n");
> > queue.AddMessage(message);
> > printf("removing message...\n");
> > queue.RemoveMessage(message);
> > printf("deleting message...\n");
> > delete message;
> > return 0;
> > }
> >
> >
> >
>
>
>


Other related posts: