Re: Key-Value coding for mutable one-many value (Java)
Re: Key-Value coding for mutable one-many value (Java)
- Subject: Re: Key-Value coding for mutable one-many value (Java)
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 3 Apr 2004 14:16:53 -0800
On Mar 20, 2004, at 4:39 AM, Bill Gardner wrote:
In order to set the content array for an NSArrayController from Java
for a property with key "topic",
I create methods in the class (a subclass of NSWindowController) which
I bind to
the contentArray of the array controller -
public int countOfTopics()
and
public Object objectInTopicsAtIndex(int index)
This works fine as long as the one-many property is immutable.
However, in order to
call addObject on the arrayController, the one-many property needs to
be mutable.
So I add the following methods to my class -
public void removeObjectFromTopicsAtIndex(int index)
and
public void insertObjectinTopicsAtIndex(Object topic, int index)
This fails with
"setValue:forUndefinedKey:]: this class is not key value
coding-compliant for the key topics"
Can anyone shed any light on why this isn't working?
Unfortunately this is a bug. I don't know when it's expected to be
fixed.
mmalc
_______________________________________________
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.