• 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: NSArrayController and the ContentArray Binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController and the ContentArray Binding


  • Subject: Re: NSArrayController and the ContentArray Binding
  • From: Patrick Machielse <email@hidden>
  • Date: Mon, 11 Oct 2004 11:55:43 +0200

op 10-10-2004 14:55 schreef Paul Sargent

> So I think my question is (but maybe my understanding of everything is
> incorrect), how do I either:
>
> a) specify a class which is instantiated in the NIB to the contentArray
> binding? (i.e. what would it's class path be from NSApplication)
>
> b) specify some class other than File's Owner from the binding
> inspector panel?

Yes, this is annoying. I don't know why you can't just bind directly to
_any_ instance from the bindings inspector. Someone?

One way to get around this is to use an intermediate NSObjectController:

Nib Instance <-- NSObjectController <-- NSArrayController.

content outlet binding inspector


This way you can do it all in IB. (You could let the Ojbect controller
instantiate the instance)

Your other choice is to create the binding in code. You could subclass
NSArrayController and than add an outlet connected to the nib instance. Then
add code like

[self bind:@"contentArray" toObject:outlet withKeyPath:@"outletArray" ...];

Patrick
---
Hieper Software

w: www.hieper.nl
e: email@hidden

_______________________________________________
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: 
 >NSArrayController and the ContentArray Binding (From: Paul Sargent <email@hidden>)

  • Prev by Date: Re: remove undo actions for NSTextView
  • Next by Date: Add a point to a NSBezierPath
  • Previous by thread: Re: NSArrayController and the ContentArray Binding
  • Next by thread: Re: NSArrayController and the ContentArray Binding
  • Index(es):
    • Date
    • Thread