Re: RE: [moderator] Re: swizzling a class to a subclass inorder to add ivars (& methods) to a class
Re: RE: [moderator] Re: swizzling a class to a subclass inorder to add ivars (& methods) to a class
- Subject: Re: RE: [moderator] Re: swizzling a class to a subclass inorder to add ivars (& methods) to a class
- From: "Clark Cox" <email@hidden>
- Date: Mon, 30 Oct 2006 19:18:50 -0500
On 10/30/06, Scott Morrison <email@hidden> wrote:
Apart from all the WWDC NDA stuff -- (which is pretty hard to miss
considering they have that on every opening slide of each
presentation, and was in reminders all over Moscone) Lets get back
to the original question.....
Is it OK to swizzle the alloc method to return an allocated subclass
rather than the superclass that was whose allocation was requested.
What are problems associated with this? -- Yes -- there may be hidden
implementation stuff that you are mucking about it. but if you know
the classes involved -- is there a problem?
If you know all of the classes involved, there really isn't a problem.
However, I can envisage some problems with ivar layout if you are
trying to replace a class that itself has subclasses over which you
have no control.
--
Clark S. Cox III
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden