• 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: confused about bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: confused about bindings


  • Subject: Re: confused about bindings
  • From: Paul Forgey <email@hidden>
  • Date: Mon, 3 Apr 2006 11:20:47 -0700

Here's a clearer way to ask my question:

Document nib:
 owned by my NSWindowController subclass
 has the NSTreeController

Some other nib @"UserGroup" later contains:
 owned by an object in the document's tree
 Form fields
 NSTableView

For the table view, I can bind that to an array controller getting it's data from the node's (owner's) children. This works just fine.

The form fields need to be bound to the tree's current selection. While that's easy to do if they are in the document nib, how can I do this in the "UserGroup" nib?


On Apr 3, 2006, at 2:02 AM, Paul Forgey wrote:

I've got a document based application. Each document is a connection to a server which speaks a proprietary network protocol. My document nib, owned by an NSWindowController subclass, has an NSTreeController. This controller has root items representing different administrative categories. The items in the tree have methods for returning an NSView shown in another part of the document's window. These views live in different nib files.

The tree controller looks to "children" to get a list of children for any given object. One of the root items is "accounts", and this object has a nib with all the UI views for users and groups. This object also has two child items "users" and "groups". When accounts.users is selected, a ScrollView shows the list of users. This is possible because the nib file has an array controller populated from <owner>.users.children.

Now if I select a user, I want that view to select the details in a form. The problem here is I can't figure out how to bind these to the selection of the tree view. I suppose if I murfed all of this into a single nib file, I could easily bind to the tree controller's selectedObjects. But I am seeing a potential problem with that too because not all objects in the selection may be appropriate for the particular view (currently if multiple items are selected with different view, no view is shown).

How do I need to set up my bindings?


_______________________________________________ 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: 
 >confused about bindings (From: Paul Forgey <email@hidden>)

  • Prev by Date: Re: Path names in executable
  • Next by Date: NSFileManager not preserving Spotlight comments
  • Previous by thread: confused about bindings
  • Next by thread: Re: confused about bindings
  • Index(es):
    • Date
    • Thread