RE: [gtkmm] wrap_new?



Maybe it's a mistake. You could try fixing it and seeing if that works.

Murray Cumming
murrayc usa net
www.murrayc.com 

> -----Original Message-----
> From: John Burris [mailto:BurrisJ linkline com] 
> Sent: Donnerstag, 8. Mai 2003 03:14
> To: Gtkmm
> Subject: [gtkmm] wrap_new?
> 
> 
> While working with the new Visual Studio .NET 2003 compiler, 
> I have come
> across something I don't understand about the declaration and 
> use of the
> static member function wrap_new.
> 
> In the file "object_p.h" for class "Object_class" the member function
> "wrap_new" is declared "Static Glib::object* 
> wrap_new(Gobject*)" in the
> public section of the class.  Then later, for example, in the file
> "relation_p.h" the same declaration "Static Glib::object*
> wrap_new(Gobject*)" exsist in the protected section of the 
> "Relation_Class"
> class.  However, in the file "wrap_init.cc" a similar 
> declaration for the
> same member function is declared as "namespace Atk {  class 
> Releation_Class
> { public: Static Glib::object* wrap_new(Gobject*); }; }".  
> Since this now
> declares the member function as public instead of protected, 
> the complier
> complains about this and later has a link error saying
> "Releation_Class::wrap_new" is undefined.  This complier 
> complaint and the
> link error are easy to fix by moving the original declaration 
> in the file
> "relation_p.h" from the protected section to the public 
> section.  As apposed
> to changing the redeclaration from public to protected in 
> "wrap_init.cc".
> Since this will not work because "wrap_init" tries to call
> "Glib::wrap_register(ark_relation_get_type(),
> &Ark::Releation_Class::wrap_new)" and Glib::wrap_register 
> can't have access
> to the protected function "Ark::Releation_Class::wrap_new".
> 
> So, my question is, why is there a redeclaration from 
> protected to public
> and how is this suppose to work?  I don't understand this at all.
> 
> John Burris
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 



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