Opened 18 years ago

Closed 18 years ago

#1196 closed bug (invalid)

BMessage::ReplaceData() shouldn't care about fixed size if there is no array

Reported by: axeld Owned by: mmlr
Priority: high Milestone: R1
Component: Kits/Application Kit Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

The "fixedSize" argument should only be taken into account for arrays - and not for the non-array variant of AddData(). Test application is attached, expected output would be: "gurkensalat"; currently, only "gurke" is seen :-)

Attachments (1)

message_add_data.cpp (417 bytes ) - added by axeld 18 years ago.

Download all attachments as: .zip

Change History (3)

by axeld, 18 years ago

Attachment: message_add_data.cpp added

comment:1 by mmlr, 18 years ago

Actually allowing this is a Dano behavior. Under R5 your test application behaves like under Haiku and returns B_BAD_VALUE on ReplaceData() resulting in "gurke" at the end.

As AddData() has the default value of true for it's fixedSize argument, it only makes sense to set the fixedSize flag for the field and then enforce it. If you want non fixed size data, you obviously would set fixedSize to false on AddData().

If you don't object I'd like to close this bug as invalid.

comment:2 by axeld, 18 years ago

Resolution: invalid
Status: newclosed

While I think the Dano behaviour is cleaner (because there is no array I would care about), I'm fine with closing the bug as invalid, since it duplicates R5 :) Thanks for checking.

Note: See TracTickets for help on using tickets.