• 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: NSViewController and key value coding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSViewController and key value coding


  • Subject: Re: NSViewController and key value coding
  • From: Mike Abdullah <email@hidden>
  • Date: Tue, 13 Jul 2010 14:42:18 +0100

Sounds to me like you're looking for Cocoa Bindings…

On 13 Jul 2010, at 00:40, Andrew James wrote:

> All,
>
> I've been writing way to much code to populate an NSPopUpButton with an array
> that can change at any moment.  Due to that, I'd rather use Cocoa's Key Value
> Coding technology.  I've read Apple docs over the past two days in regards to
> key value coding and observing.
>
> To really cement my understanding, I'd like to have an intial implementation
> that uses a programatically configured NSViewController.  By that I mean
> explicitly setting the view ( -setView ) and the represented object (
> -setRepresentedObject ) of the NSViewController instance.
>
> The view will be an NSPopUpButton and the  represented object will be an
> instance of  key value coding compliant class that conforms to the Indexed
> Accessor requirements.
>
> If the NSViewControllers view and represented object are correctly set...
>
> 1) Will the controller auto-magically insure that the pop up button gets
> populated with data pulled from the represented object?
> 2) Does the controller register as a key value observer with the represented
> object?
> 3) If changes to the represented object can come in from threads other than the
> main thread will the NSViewController key value observing implementation handle
> delivering requests to redraw to the main thread? Or does the represented object
> have to make sure that all of it's changes occur on the main thread?
>
> Cheers,
> --aj
>
>
>
> _______________________________________________
>
> 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

_______________________________________________

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

References: 
 >NSViewController and key value coding (From: Andrew James <email@hidden>)

  • Prev by Date: setValue:forKey: and invocation forwarding
  • Next by Date: Re: setValue:forKey: and invocation forwarding
  • Previous by thread: NSViewController and key value coding
  • Next by thread: NSResizableWindowMask and view update
  • Index(es):
    • Date
    • Thread