The object's -init looks like this: - (id)init { if( !gReg ) { if( ( self = [ super init ] ) ) { // Zero out members... keys = nil; lastFlushTime = nil; } } return self; }
Oddly, I just ran the exact same source file in another app and it all works fine. Must be a stack blow or something. ________________________________ From: David Blanton <aired...@tularosa.net> To: Erg Consultant <erg_consult...@yahoo.com> Cc: cocoa-dev@lists.apple.com Sent: Thursday, May 28, 2009 5:21:55 PM Subject: Re: -init never gets sent what does the declaration of init look like? On May 28, 2009, at 5:46 PM, Erg Consultant wrote: > Oddly, the object returned is non-nil. > > I should mention that the pointer being returned is a hack global > declared at the top of the file like this: > > static Registry *gReg = nil; > > but that shouldn't matter. And I've checked that that global is > never set to nil or created twice anywhere else in the code. > > Erg > > > > > ________________________________ > From: David Blanton <aired...@tularosa.net> > To: Erg Consultant <erg_consult...@yahoo.com> > Cc: cocoa-dev@lists.apple.com > Sent: Thursday, May 28, 2009 4:38:42 PM > Subject: Re: -init never gets sent > > what is the result of [ Registry alloc ] ? > > On May 28, 2009, at 5:34 PM, Erg Consultant wrote: > >> I have an object which I initialize like this: >> >> gReg = [ [ Registry alloc ] init ]; >> >> Problem is, my init method never receives any message. >> >> Does anyone know what can cause this? >> >> Thanks, >> >> Erg >> >> >> >> >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> Please do not post admin requests or moderator comments to the list. >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/airedale%40tularosa.net >> >> This email sent to aired...@tularosa.net >> >> > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/airedale%40tularosa.net > > This email sent to aired...@tularosa.net > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com