g_object_{new,set,get} vs. class-specific function

Eric Polino aluink at gmail.com
Sun May 20 13:23:33 EDT 2007


At some point this week I'd like to get together with a devel or two who are
familiar with the gobject model.  I am reading a lot of the gnt code and for
the most part it makes sense, but there are somethings that are just not
clicking.  I've read the docs at
http://developer.gnome.org/doc/API/2.0/gobject/index.html and
http://developer.gnome.org/doc/API/glib/
to help me survive.  I tried to write a bit of code to familiarize myself
with the model but I just don't get a few things.  A copy of my *play code*
can be found at http://aluink.googlepages.com/test.c

So, sometime, hopefully before the 28th when SoC *officially* starts, though
I've pretty much begun working already, I'd like to chat with a few people
who are familiar with how it all works.  Someone told me Grim knew quite a
bit about it, and I've been talking to Sadrul here and there, but after a
while it gets annoying to work for a while and come to a standstill until I
can have this one question answered, then work some more and have another
one to get answered.  So a good QA/walkthrough/"here's what's missing here
and there" session would be good to give me a good understanding of the
model so I can work with Gnt more efficiently.

Almost as an epilogue, when that's all fine and dandy, I need to be able to
understand the Gnt/GTK+ event/signal/action pattern better.  I'm trying to
do a few things with Gnt's key_pressed signals, but there are a few links
missing.

So this week sometime, preferably early, it'd be good to get together.  I
might stop by #pidgin later tonight (Sunday evening EDT).

Thanks,
Eric

On 5/20/07, Richard Laager <rlaager at wiktel.com> wrote:
>
> On Sun, 2007-05-20 at 11:48 +0300, Gabriel Schulhof wrote:
> > You asked me why I prefer using GObject properties rather than
> > class-specific accessors and constructors. A bit of an essay follows, so
> > please feel free to ignore it and instruct me to use the class-specific
> > functions in Pidgin :o)
>
> (08:14:23) Richard: I guess my big concern is that the named functions
> could have other logic that we're missing.
>
> (08:15:07) Gabriel Schulhof: That's true. I have uncovered several GTK+
> bugs wherein the "notify::<property>" signals were not being emitted
> when the properties were being modified.
>
> (08:15:55) Gabriel Schulhof: ... and if there /is/ such other logic,
> then that constitutes a GTK+ bug, now that there appear to be 2 ways of
> achieving the same thing.
>
>
> I think Gabriel has some good points on why the GObject syntax can be
> better. On the other hand, aside from my concern above, this syntax is
> not what's used in examples, which may hinder patch writers.
>
> I believe we should either stick with what we've got, or start writing
> all new code the way Gabriel has. Currently, I'm leaning towards
> sticking with what we've got because more people are familiar with it.
>
> Richard
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
>
>


-- 
"...indexable arrays, which may be thought of as functions whose domains are
isomorphic to contiguous subsets of the integers."
--Haskell 98 Library Report
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20070520/0a70d717/attachment.html>


More information about the Devel mailing list