Re: [gtk-list] Re: Gtk--: Why does this (specific code) compile at all?



At 14:22 16/04/99 +0200, you wrote:
>
>
>
>> I don't know Gtk--, but I do know C++.
>>
>> Maybe there are two add() functions:
>>
>>   void add(Gtk_Widget &child, ...)
>>   void add(Gtk_Widget *child, ...)
>>
>> add() is an overloaded function and everything works as expected.
>
>I can find 2 add functions (in packer.h):
>     void add (     Gtk_Widget &child,
>               GtkSideType side,
>               ... default args ...);
>     void add (const Gtk_ObjectHandle<Gtk_Widget> &child,
>               ... default args ...);
>
>Seems like I'm using the 2nd one ... still not sure why this isn't
>flagged as an error ... most other functions which require a
>reference (such as pack_start, etc.) flag this as wrong (seen
>it *many* times) ...
Yes I think there is a constructor of
Gtk_ObjectHandle<Gtk_Widget>(Gtk_Widget *) which assures the automatic
conversion.

Manu



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]