• 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
NSNib: replacement objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNib: replacement objects


  • Subject: NSNib: replacement objects
  • From: Pierre Bernard <email@hidden>
  • Date: Thu, 6 Dec 2007 23:39:01 +0100

Hi!

I used to do this with Java NIBs on WebObjects, but never figured out how to do this in Cocoa.

Imagine I have a NIB set up with an NSArrayController. Is there a way to create the NSArrayController before loading the NIB, having the dearchiving process skip the NSArrayController, connect and bind to the already existing instance.

The concrete example I have run into today: I need to access an NSArrayController created in my Document NIB from a NIB loaded at a later point in time. In this precise case the controller of the auxiliary NIB is instantiated from the Document NIB. So the easiest thing to do would be to connect the controller and the NSArrayController right within the Document NIB. But when I do so I cannot have the NSArrayController "icon" in the auxiliary NIB. Thus I need to bind manually.

Actually I see one solution, but that seems a bit weird. I could have a NSController objectin my NIB to act as a proxy to an attribute of the controller. Actually, I did just that in HoudahSpot 1.x

Pierre

---
Pierre Bernard
http://www.bernard-web.com/pierre
http://www.houdah.com



_______________________________________________

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: NSNib: replacement objects
      • From: David Spooner <email@hidden>
  • Prev by Date: Re: Getting date and time in regional language
  • Next by Date: Notification for mouse-up on NSStepper
  • Previous by thread: Re: -[NSImage TIFFRepresentation] failing on the multiple files icon?
  • Next by thread: Re: NSNib: replacement objects
  • Index(es):
    • Date
    • Thread