Re: Abstract class with single subclass
Re: Abstract class with single subclass
- Subject: Re: Abstract class with single subclass
- From: Dave Keck <email@hidden>
- Date: Wed, 27 May 2009 11:15:46 -1000
> Actually, I accidently used [self class] in a class method two weeks ago,
> and it was causing a crash. I forget the circumstances, but when I caught
> that I was using [self class] and changed it to self, everything worked
> fine. So I don't know what the difference is, but there apparently is a
> difference.
That sure sounds strange. +class is plainly defined as a class method
of NSObject. If it's crashing, it sure seems like that'd be a pretty
significant (and probably well-known) bug. The first things that come
to mind that might result in +class crashing are either doing
something fancy with distributed/proxy objects, or perhaps the bundle
that defined the class was unloaded before +class got called.
In "normal" everyday use, [self class] in a class method should never
cause problems, AFAIK.
David
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden