• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bypassing Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bypassing Interface Builder


  • Subject: Re: Bypassing Interface Builder
  • From: Johnny Lundy <email@hidden>
  • Date: Wed, 14 May 2008 20:15:48 -0400

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Bypassing Interface Builder
      • From: Uli Kusterer <email@hidden>
    • Re: Bypassing Interface Builder
      • From: "I. Savant" <email@hidden>
    • Re: Bypassing Interface Builder
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Bypassing Interface Builder
  • Next by Date: Re: show/hide NSTabView
  • Previous by thread: Re: Bypassing Interface Builder
  • Next by thread: Re: Bypassing Interface Builder
  • Index(es):
    • Date
    • Thread