Re: Questions about gnome-objc?
- From: Elliot Lee <sopwith redhat com>
- To: Dirk Luetjens <dirk luedi oche de>
- cc: gnome-list gnome org
- Subject: Re: Questions about gnome-objc?
- Date: Tue, 12 May 1998 19:37:57 -0400 (EDT)
On Wed, 13 May 1998, Dirk Luetjens wrote:
> last week I tried to learn some Objective-C. As an example I started a
> small app gpstool which tries to be a frontend to the pstools namely
> psnup, psbook, pstops.
> A few questions arised about the Objective-C bindings for gnome and gtk.
> Perhaps someone with more knowledge can give me a hint:
> (Sorry if the terms I use are C++ like. I just started to learn objc:-)
> 1.) Why do all objects have a cast"whatever" method and a member
> variable which is a pointer to the casted Object? Isn't this kind of
> bloat if you have the pointer to the object stored x-times through the
> inheritance hierarchy?
It's bloat, yes. We could theoretically have just a gtkobject. I think
it's more for convenience than anything else ;-)
The castGtk* methods are there to allow converting native Gtk widgets into
obgtk objects. For example, to use gnome_stock_buttons I just do:
[[Gtk_Button alloc] castGtkButton:GTK_BUTTON(gnome_stock_button("OK"))]
> 2.) I thought that overloading of intherited methods and calling the
> overloaded method within the new method is the right way. Wouldn't it be
> better to use only init Functions with default Arguments or overloaded
> versions of init than using initApp, InitWithAppWinInfo, ... Functions?
Where appropriate, I try to provide a - init that calls the "real"
initBlahBlah method with sane arguments.
> I don't know if Objective-C supports Default Arguments.
> 3.) What is the performace penalty of such a wrapper library. When I
> compare just the size of the libraries, I'm astonished, that libobgtk is
> about half the size of libgtk. Isn't that to much just for a wrapper
> libgtk.so 608916 Bytes (stripped)
> libobgtk.so 1674271 Bytes (not stripped)
> libobgtk.so 260060 Bytes (stripped)
[sopwith@moebius lib]$ size libobgtk.so
text data bss dec hex filename
161498 26296 28 187822 2ddae libobgtk.so
[sopwith@moebius lib]$ size libgtk.so
text data bss dec hex filename
702627 10492 832 713951 ae4df libgtk.so
The actual meat of the two libraries is 3.83 times bigger in gtk vs.
obgtk. But yes, wrappers do take space :-)
> 4.) Can someone explain me how GNUstep is related to GNOME, or vice
I don't think there's any relation, other than the fact that they are both
> From what I find on the net, there must be an Next-Developper-App, where
> you drag-n-click your application together. Will there ever be a GNOME
> version of this?
Hopefully yes. Not in the near future though.
> 5.) Where can I learn more about Objective-C?
http://developer.apple.com/ I think - check the Rhapsody section. They
have the Objective C book online in .pdf and .html formats.
> 6.) What is the future of gnome-objc?
As long as someone gives a care, it'll be maintained ;-)
> I made a few wrappers for the non existent gnome objects "About",
> "FileEntry", "PropertyBox" in the way of the other libobgnome bindings.
> Perhaps they are usefull for the completeness of the library.
Thank you! Send me what you have and I'll attempt to integrate them in
when I have time.
When I die, I want to die peacefully in my sleep like my grandfather...
...not yelling and screaming like the people in the back of the
plane he was flying.
] [Thread Prev