• 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: Class Hierarchy in the Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class Hierarchy in the Interface Builder


  • Subject: Re: Class Hierarchy in the Interface Builder
  • From: James DiPalma <email@hidden>
  • Date: Fri, 28 May 2004 11:49:03 -0700

Reimport your headers into your nib file: drag AbstractController.h from PB into your nib's document window, then ControllerA.h and ControllerB.h (if you drag ControllerAorB.h in first, IB should complain).

It works at runtime because AppKit finds your class by name, essentially doing:

[[NSClassFromString(className) alloc] init];

Unless, you palettized your controllers (unlikely for someone new to cocoa).

IB's class hierarchy is mostly (only?) for IB's use in finding outlets, actions, and maybe editors? for a given class.


-jim

On May 28, 2004, at 6:41 AM, email@hidden wrote:

Hello

I am relatively new to cocoa and have a kind of a refactoring problem:

Two Controller ControllerA and ControllerB have common Code, therefore I introduce an AbstractController as a superclass of ControllerA and ControllerB. The AbstractController has only be added in XCode while the other Classes are used in the Interface Builder, too. Now if I look at the Class Browser of the Interface Builder ControllerA and ControllerB are still subclasses of NSObject. While the code is working correct, the missing class in the IB might be confusing...
Any idea to fix this problem?

Thank you

Roman Bertolami
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Class Hierarchy in the Interface Builder (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Binding & other actions
  • Next by Date: Re: Binding & other actions
  • Previous by thread: Re: Class Hierarchy in the Interface Builder
  • Next by thread: Binding & other actions
  • Index(es):
    • Date
    • Thread