Re: Accessing an NSArrayController in another NIB file
Re: Accessing an NSArrayController in another NIB file
- Subject: Re: Accessing an NSArrayController in another NIB file
- From: Claudio Mezzasalma <email@hidden>
- Date: Sat, 19 May 2007 23:51:57 +0200
- Resent-cc: mmalc crawford <email@hidden>
- Resent-date: Sun, 20 May 2007 01:05:29 +0200
- Resent-from: Claudio Mezzasalma <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
Il giorno 19/mag/07, alle ore 18:05, mmalc crawford ha scritto:
On May 19, 2007, at 2:28 AM, Claudio Mezzasalma wrote:
Let me add something i missed in the first message: my goal is to
replicate a button's behavior in the main menu as well. Since I
used a binding to enable/disable the button, according to
NSArrayController canRemove (sorry, canRead was a typo), I thought
I had to use the same mechanism.
Bind to
[Application].mainWindow.windowController.document.pathToArrayControll
er.canRemove
mmalc
I assume that [Application] is the File's Owner (NSApplication)...
but now I get the following exceptions:
[<MyDocument 0x52a4e0> addObserver:<NSKeyValueObservationForwarder
0x100f4e60> forKeyPath:@"characterController.canRemove" options:0x0
context:0x52a480] was sent to an object that is not KVC-compliant for
the "characterController" property.
[<NSWindow 0x10651020> removeObserver:<NSKeyValueObservationForwarder
0x576d30>
forKeyPath:@"windowController.document.characterController.canRemove"] w
as sent to an object that has no observers.
So I thought I had to use the entitiy defined in the data model, but
the exception is still there (except the fact that I get Character
(the entity) instead of characterController, as it's supposed to be).
I'm a bit confused...
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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