discuss-gnustep
[Top][All Lists]
Advanced

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

Re: RFC: Non-fragile ivars


From: Michael Ash
Subject: Re: RFC: Non-fragile ivars
Date: Tue, 03 Jun 2008 08:47:42 -0500
User-agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (FreeBSD/4.11-RELEASE-p20 (i386))

Saso Kiselkov <skiselkov@gmail.com> wrote:
> It would be great to also add this algorithm into +poseAsClass: and
> possibly category handling, since that would allow to have posing
> classes and categories define their own ivars.

You have to be really careful with this because you can't have any 
existing instances of the class in question when you make such a 
modification. If there are already objects floating around then a lot of 
bad things happen. This will work fine if you load categories at launch or 
explicitly pose before creating objects, but normally these two operations 
have been safe to perform at will. I assume that this is at least part of 
the reason why Apple doesn't allow declaring ivars in categories even with 
their new shiny runtime.

-- 
Mike Ash
Radio Free Earth
Broadcasting from our climate-controlled studios deep inside the Moon


reply via email to

[Prev in Thread] Current Thread [Next in Thread]