Re: How to hadle the objects? g_set_data, global?

On Dec 11, 2007 10:31 PM, Alexandre Moreira <alexandream gmail com> wrote:

Actually I think it would be good to hear what others have to say
about it. What do you think, guys ? set_data ? global stuff everywhere
? lots of gobjects ? or perhaps a mix of all that ?

I agree that from the application author's point of view, depending
on complexity, its well worth while to create a GObject for the major
entities of your app (see DevHelp sources for a good simple example).

When you dont want or need to go that extra mile then classically
I think people use structures full of relative object pointers and
relative information of a said module, and just pass the pointer
of that struct to all the related callbacks.

I think the yield of using GObject is even greater when developing
a library that might be used by many, and who's requirements might
change over time, since it provokes sound OO design early in the
game and provides a level of encapsulation.


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