Re: GObject instantiation hopelessly overcomplicated??



Hi,

Ryan McDougall <NQG24419 nifty com> writes:

> The part that I don't understand is why two functions are necessary, it
> makes it unclear for the programmer where to put his init code. What
> code has to run in class_init that can't run in base_init? There appears
> to be no reason why, so thats exactly what I am asking for (a reason
> why).

You almost never use base_init() and your tutorial would better tell
people to use class_init() which is what almost all of the code out
there is doing (disclaimer: I didn't read your tutorial). I haven't
yet seen any code that uses base_init() so I can't tell you what it's
good for.

> You've also said nothing about why it copies the parent class over
> the child class.

Simply so that it inherits whatever is in the parent class. There
needs to be a copy so that a derived class can override functions
without changing the parent class.

> I'm not asking for a change, which would be practically very
> difficult, for mostly aesthetic benefits (although it might be
> considered for the 3.0 time frame). What I want to know is why it is
> that way so I can inform readers of my tutorial the reason for the
> madness, and therefore where they should put their code.

Please don't call it madness unless you understood it completely and
are able to judge. If you continue to rant on the GObject
implementation it is very likely that you won't receive any further
answers to your questions.


Sven



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