[haiku-3rdparty-dev] Re: BPictureButton with own BMessenger

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Fri, 04 Mar 2011 08:56:21 +0100

On 2011-03-04 at 01:28:23 [+0100], Brian Hill <perelandra777@xxxxxxxxx> 
wrote:
> Robert,
> Try replacing in your custom class:
> 
> BArchivable*
> CustomPictureButton::Instantiate(BMessage *msg) {
> 
> with:
> 
> CustomPictureButton*
> CustomPictureButton::Instantiate(BMessage *msg) {

This is *not* correct. This method must return a BArchivable* or, depending 
on how your class is derived from BArchivable, you might actually break 
things.

CU, Ingo

Other related posts: