Re: Initialisation/Finalisation



On Thu, Nov 07, 2002 at 05:03:01PM +0000, iain wrote:
     On Wed, 2002-11-06 at 10:38, John Darrington wrote:
     
     > 1.   /* And override the finalize method here */
     >      static void
     >      class_init (PGCClass *klass)
     > 
     >      I take it your typo was in the comment rather than the code?
     > 
     
     What typo?
     The klass? I just write it that qay out of habit and the c++ compilers
     that don't like variables named class.

I was alluding to the fact that your comment says finalize, but your
code says init.

     Iain's quick object
     Hopefully it'll make things clearer than either me describing stuff, or
     giving random snippets of code.
     

Thanks, for that.  I'll give it a go this weekend and see how I go.


     I've been writing GObjects (and GtkObjects) for 4 years now, and I've
     never written an object that has anything other than a class init func
     and an instance init func.
     

But have you been writing just the odd object, or have you created a
heirarchy of them.  In my application, I'll have one `holder object'
(abstract class in C++ terminology) and a whole hierarchy of derived
objects.  From what I gleem from the documentation, this is where the
BaseInit/Finalise comes in to play.

J'


-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://www.keyserver.net or any PGP keyserver for public key.


Attachment: pgpqEFtgftfGJ.pgp
Description: PGP signature



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