Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: custom class init question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom class init question



> I add the extra notes because if you care about portability, using
> the first type of string example could lead to a situation where you
> have un-portable code, atleast without some extra work to extend the
> default NXConstantString class in GNUstep to respond to release/
> autorelease messages.

Uh - but you would have to do that anyway, as the releasse and
autorelease methods are not part of Objective-C, they are methods
defined by Cocoa (which is why you have problems). This applies
to *any* objects, not just strings. try doing this:

	id myObject = [Object new];
	[myObject release];

and you will get the same error for the same reason.

I write code like this all the time, and have my own little kit of foundation
objects which respond to retain/release and all the rest so I can write as I
would if I were on a NeXT/Apple system - it's easy enough to do (the basics
took a couple of days to write).

-pcf.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: custom class init question (From: Christopher Lee <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.