• 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: A couple controller/nib questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple controller/nib questions


  • Subject: Re: A couple controller/nib questions
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 9 Nov 2004 10:40:10 -0800


On Nov 8, 2004, at 11:55 AM, Ali Lalani wrote:
On Nov 2, 2004, at 12:17 PM, Ali Lalani wrote:
1. I'd like to be able to bind properties of objects (cocoa bindings) to other objects which appear in the NIB suitcase, other than File's Owner and other controllers. [...]
<http://www.cocoabuilder.com/archive/message/2004/2/24/97729>
Do you really want to bind the content of the array controller to a view, or the other way round? You almost certainly should not be binding an array controller's content to a view.
OK - that was a bad example. But I may want to bind something in the UI to another object in the suitcase, much like how I might bind an array controllers content binding to the file's owner.

"You cannot at the moment bind to arbitrary other objects in a NIB file. You'll have to make the binding programatically, using -bind:toObject:withKeyPath:options:."


2. If i make an NSView the file's owner in InterfaceBuilder, it doesn't let me edit the view as it would if it was not file's owner but just instantiated in the nib. Is there some reason for this?
You almost certainly don't want an NSView as the File's Owner. What are you trying to achieve?
We are creating complex NSViews, and it is a lot easier to set them up in IB than programmatically. For example, our subclass of NSView could have a tableview as one of its subviews. We wouldn't want to set that up, its columns and column bindings to a controller, programmatically. Is there a better/preferred way to do this?

It's not quite clear from this what bindings need to be established to what objects. Does your view serve as a controller in this case?

mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >A couple controller/nib questions (From: Ali Lalani <email@hidden>)
 >Re: A couple controller/nib questions (From: mmalcolm crawford <email@hidden>)
 >Re: A couple controller/nib questions (From: Ali Lalani <email@hidden>)

  • Prev by Date: Re: New Spotlight Info
  • Next by Date: Re: New Spotlight Info
  • Previous by thread: Re: A couple controller/nib questions
  • Next by thread: Re: Interface Creation
  • Index(es):
    • Date
    • Thread