Hi Gurus,

I am a cocoa newbie from Java. Recently I found an example code in which the instance of a class is defined in its own class's header file, as following:

@interface AppController : NSObject {
        
        // Instance variables here
        
}

AppController *appController;


And then this head file will be imported in MyDocument.h(there are methods using appController in MyDocument.m).

I am a little bit confused by this code. Since always we will create the controller in IB and then I think the instance will be created by IB, right? So is there any advanced features/reasons for this kind of usage?

In my opinion, I'd like to have a line of

IBOutlet AppController *appController;

in my MyDocument.h and then connect it with the appController in IB. Which implementation will be preferred by you?

Thanks in advance for any instructions!

---------------
JArod Wen




_______________________________________________

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