Opened 5 years ago

Last modified 5 months ago

#11138 assigned bug

Alert _text field archived but never instantiated (easy)

Reported by: Eddy Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: BAlert _text archive Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

In Alert.cpp, the _text field is archived but never restored in the BAlert::BAlert(BMessage* data) function.

Change History (8)

comment:1 by pulkomandy, 5 years ago

Summary: Alert _text field archived but never instantiatedAlert _text field archived but never instantiated [easy]

comment:2 by pulkomandy, 5 years ago

Summary: Alert _text field archived but never instantiated [easy]Alert _text field archived but never instantiated (easy)

comment:3 by axeld, 2 years ago

Owner: changed from axeld to nobody
Status: newassigned

in reply to:  4 comment:5 by khyati-agarwalss, 5 months ago

Replying to korli:

Code pointers: https://git.haiku-os.org/haiku/tree/src/kits/interface/Alert.cpp#n188 https://git.haiku-os.org/haiku/tree/src/kits/interface/Alert.cpp#n135

Test case example: https://git.haiku-os.org/haiku/tree/src/tests/kits/app/bhandler/BHandlerTester.cpp => new test case: src/tests/kits/interface/balert/BAlertTester.cpp

There is no _text variable in Alert.cpp, how should I use it in Instantiate function?

comment:6 by korli, 5 months ago

I would code an archive unit test, and compare with BeOS R5. The _text is actually part of the text view in Haiku, maybe it's different in R5.

comment:7 by khyati-agarwalss, 5 months ago

Is it about calling "BAlert::Instantiate(BMessage* data)" inside "BAlert::BAlert(BMessage* data)" function?

in reply to:  7 comment:8 by korli, 5 months ago

Replying to khyati-agarwalss:

Is it about calling "BAlert::Instantiate(BMessage* data)" inside "BAlert::BAlert(BMessage* data)" function?

No, please first create a unit test, calling Archive() on a BAlert, dump the resulting BMessage, then instantiate a BAlert using the archive.

Note: See TracTickets for help on using tickets.