[haiku-appserver] Re: BMessage AddData

  • From: Korli <korli@xxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Tue, 12 Jul 2005 22:08:57 +0200

Is somebody against clearing out all BMessage::Add* methods to go through BMessage::AddData ?
This would make things very easier. I don't see any reason to use a BMessageBody::AddData<TYPE>.
If we keep it, when unflattening, we have to use this particular AddData<TYPE> so that the BMessage::Find* methods still work (if not we end up on a class cast error).
It would also fix BMessage::AddData used with a B_*_TYPE and with a size.


Hope I'm clear enough :)
Bye,
Jérôme

Korli a écrit :

Hi,

I'm having problems with BMessage::AddData(), typically when used with a B_UINT8_TYPE and with a size.
As I don't understand fully this code, could someone have a look at this method ? It doesn't handle every type codes the same way which is very weird.


I didn't find unit tests for this method. Having one would also be great.

The problem appears in input_server : no key_states is found in input messages, applications depending on these key states can't work as expected.

Thanks,
Jérôme








Other related posts: