Hi,

On this topic, when I drag an object out of the Library and set its class, IB sets the label of the object to the Class Name. Since this is an instance of the class, and not the Class Object itself, why is the name capitalized? And if I want to refer by name to that instance in my code, what is the name of the instance?

Say I drag out an object and set its class to MyClass. IB dutifully names the object MyClass also. So in my code if I code [MyClass somemessage], does that message go to the Class Object or to the instance made in IB? If to the Class Object, how do I code to refer to the instance?

Also, I found out that IB will not let me make 2 instances of the same Class. In code, I could say myClassInstance1 = [MyClass new]; and MyClassInstance2 = [MyClass new];, but apparently not in IB.

This has been a mystery to me for six years now.

Also, the documentation only says about File's Owner that it is the object that loaded the nib file. What is that object, if my nib file just gets loaded at application launch?

Thanks
Johnny
On May 14, 2008, at 2:32 PM, Andy Lee wrote:

When your application *loads* a nib, it:

(3a) instantiates the objects,
(3b) sets their attributes, and
(3c) connects them both to each other and to certain things in your
application (in particular, File's Owner, which you should
definitely understand).


_______________________________________________

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