logo       

Re: Gnome2::IconList bug: msg#00283

Subject: Re: Gnome2::IconList bug

On Thursday, January 29, 2004, at 10:16 AM, Ross McFarland wrote:

"Cristóvão B. B. Dalla Costa" said:
Further investigation with the debugger, using the 'm' command to list
its methods, revealed that the Gnome2::IconList class inherits from
none. I worked around the problem by inserting the following line in my
startup code:

@Gnome2::IconList::ISA = ('Gtk2::Widget');

you solution, of course, is a temporary workaround.

i can confirm the problem, looking at the pod of Gnome2::IconList doesn't show
any heirarchy.

from the looks of it (icon list header file) GnomeIconList is a GnomeCanvas which would mean that Gnome2 probably needs to depend on Gnome2::Canvas, in fact if i add 'use Gnome2::Canvas;' to Gnome2.pm the problem goes away and the pod now shows the hierarchy. (note that the real solution will involve more
than just adding the use statement.)

the reason for this, of course, is that gperl_register_object() can only set the parent in @ISA if the parent has been registered, since we go by class names. since GnomeIconList inherits from GnomeCanvas, but GnomeCanvas has not yet been registered with the bindings, the GnomeIconList => Gnome2::IconList mapping sits in a queue held statically inside gperl_register_object().

simply adding "use Gnome2::Canvas" anywhere in the program should cause it to work.

but, yes, this appears to be a dependency problem. it looks like Gnome2 will have to depend on Gnome2::Canvas as well as Gnome2::VFS... *or* have Gnome2's boot code register a type mapping for GnomeCanvas.

this trick will actually work, i think; multiple mapping registrations are fine, especially for GObjects, because it's just GType to name. (for boxed types it's dangerous to lose the wrapper class, but GObjects don't have that problem.) so in Gnome2::IconList's BOOT section you should be able to get away with

        gperl_register_object (GNOME_TYPE_CANVAS, "Gnome2::Canvas");

libgnomeui depends on libgnomecanvas, so GNOME_TYPE_CANVAS should be available. no typemaps are strictly needed, because gperl_get_object() does all the work from GTypes.


--
"that's it! you're a genius!" "yes. that's what i think. do you think i deserve a raise?"
        - dialogue from 'Godzilla versus Mothra', 1964


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe