[haiku-development] Re: Issue adding deskbar replicant from a server

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 19 Jan 2017 21:34:53 -0500

On Thu, Jan 19, 2017 at 9:10 PM, Brian Hill <brianh@xxxxxxxxxxxx> wrote:

So I think what is happening is this:  I created a new class
DeskbarShelfView which will draw the icon (and eventually do something
simple like send a message to tell the notification center to show/hide).  I
am building this in the Haiku source tree, and the newly compiled server
binary is located in /Data/haiku/haiku/generated.x86gcc2/objects yada yada.

Now to test my version of the notification_server I blacklisted the system
notification_server in /boot/system/settings/packages.  So this prevents the
system version from running, and I manually run my version to test the
updated notification_server.

But, when I send an archived instance of my DeskbarShelfView class to add to
the deskbar, is it looking for my class in the system's notification_server
binary in /boot/system/servers?  Because that file doesn't exist.  Does it
try to find a match by the server signature but fails to find my version?
It seems like it can't instantiate my new class and throws the error.  That
is my best guess.

From a quick glance, your signature for Instantiate is incorrect:

static DeskbarShelfView* Instantiate(BMessage* data);

should be:

static BArchivable* Instantiate(BMessage* data);

This may be what's causing it to fail, since if it doesn't find that
symbol, it won't be able to recreate your view.

Regards,

Rene

Other related posts: