• 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 14:32:23 -0700

The articles I've been able to search out seem to be related to getting a key path to the controller. That's never been an issue. I just can't bind to it correctly.

For example, in my document nib, I could bind a text field like:

value:
 bind to: MyController (NSTreeController)
 Controller Key: selection
 Model Key Path: myField

But in the other nib, I can easily get to the controller. But I can't set up the binding with the "Controller Key: selection" part.

On Apr 3, 2006, at 12:04 PM, Matt Neuburg wrote:

So, Paul, does your question simply boil down to how to use bindings across
multiple nibs? If so, try a search in the cocoabuilder archives on something
like "bindings multiple nibs". m.


On Mon, 3 Apr 2006 11:20:47 -0700, Paul Forgey <email@hidden> said:
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?






-- matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/> A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! <http://www.amazon.com/gp/product/0596102119>



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: confused about bindings - SOLVED
      • From: Paul Forgey <email@hidden>
References: 
 >Re: confused about bindings (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Path names in executable
  • Next by Date: Re: confused about bindings - SOLVED
  • Previous by thread: Re: confused about bindings
  • Next by thread: Re: confused about bindings - SOLVED
  • Index(es):
    • Date
    • Thread