• 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: NSController, currentDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSController, currentDocument


  • Subject: Re: NSController, currentDocument
  • From: Marco Binder <email@hidden>
  • Date: Wed, 5 Nov 2003 18:17:45 +0100

I ve done it like this: connected the UI items of the palette to the shared application ("File4s Owner") and simply specified the following keypath: mainWindow.document.whateverPropertyYouDesire

Worked for me (have tried it only briefly).

Tougher seems to be to have an NSArrayController in my document managing an array of items (displayed in an NSTableView) and now accessing properties of the currently selected item in such a "global" info panel. Havent tried yet, but cant come up with an easy solution. Scott, would something like this work: bind the palette Ui items to the shared app with a keypath of mainWindow.document.arrayController.selection.desiredProperty? (if, of course, the document has an outlet connected to the arrayController)

Marco


Am 05.11.2003 um 00:23 schrieb Scott Anguish:

On Nov 4, 2003, at 10:34 AM, Raphael Sebbe wrote:

Hi there.

Currently playing with NSController...

I want to access attributes from the current document in a "global" (one common to all documents, that reflects the values of the current document) info panel, on a NIB by itself. Do I have to connect the NSController associated through code or is there a "more user-friendly" way of accomplishing that ?


I've not tried this yet (it's on the list, but it's a long list).

You'd need to create an NSObjectController with the sharedDocumentController's currentDocument as source and then bind to that. The shared Application object is likely the easiest place to do this (add a method there that returns the current document).
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSController, currentDocument
      • From: Jim Balhoff <email@hidden>
    • Re: NSController, currentDocument
      • From: mmalcolm crawford <email@hidden>
    • Re: NSController, currentDocument
      • From: Marco Binder <email@hidden>
References: 
 >NSController, currentDocument (From: Raphael Sebbe <email@hidden>)
 >Re: NSController, currentDocument (From: Scott Anguish <email@hidden>)

  • Prev by Date: Producer / Consumer
  • Next by Date: Re: window above main menu bar
  • Previous by thread: Re: NSController, currentDocument
  • Next by thread: Re: NSController, currentDocument
  • Index(es):
    • Date
    • Thread