FROM : John Stiles
DATE : Tue Nov 30 19:48:24 2004
On Nov 30, 2004, at 10:46 AM, Andrew Farmer wrote:
> On 29 Nov 2004, at 19:19, Jeff Laing wrote:
>> I have to say, I'm not sure that the following is legal.
>>
>> @implementation NSTextView (HexTextView)
>> - (void)swapForHexTextView
>> {
>> isa = [HexTextView class];
>> }
>> @end
>>
>> Is 'isa' really writeable? Is this not going to crash and burn???
>
> Believe it or not, it is.
>
Of course, "it's writable" is a separate statement from "it isn't going
to crash and burn." That one is really kind of up in the air AFAIK :) I
think you are probably open to memory leaks and all sorts of other
potential problems if you go this route.
DATE : Tue Nov 30 19:48:24 2004
On Nov 30, 2004, at 10:46 AM, Andrew Farmer wrote:
> On 29 Nov 2004, at 19:19, Jeff Laing wrote:
>> I have to say, I'm not sure that the following is legal.
>>
>> @implementation NSTextView (HexTextView)
>> - (void)swapForHexTextView
>> {
>> isa = [HexTextView class];
>> }
>> @end
>>
>> Is 'isa' really writeable? Is this not going to crash and burn???
>
> Believe it or not, it is.
>
Of course, "it's writable" is a separate statement from "it isn't going
to crash and burn." That one is really kind of up in the air AFAIK :) I
think you are probably open to memory leaks and all sorts of other
potential problems if you go this route.






Cocoa mail archive

