Le 22 févr. 08 à 15:57, Adhamh Findlay a écrit :


On Feb 22, 2008, at 5:23 AM, [EMAIL PROTECTED] wrote:

In MyObj.m

@interface MyObj(PrivateStuff)
-(void) aPrivateMethod;
@end;

@implementation MyObj

-(void) aPrivateMethod
{
// Do something
}

-(void) onePublicMethod
{
[self aPrivateMethod];
}
@end

Not to be too picky, but there's an extra semicolon after @end;

@interface MyObj(PrivateStuff)
-(void) aPrivateMethod;
@end

Adhamh

If you want to be picky, I will also add that using a class extension will be more appropriate, so the compiler will emit a warning if you do not implements the private methods:

@interface MyObj ()
-(void) aPrivateMethod;
@end


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to