Re: Generating default values in a bindings controlled
Re: Generating default values in a bindings controlled
- Subject: Re: Generating default values in a bindings controlled
- From: Richard Stacpoole <email@hidden>
- Date: Sat, 16 Apr 2005 17:24:21 +1000
Message: 15
Date: Fri, 15 Apr 2005 14:34:32 -0700
From: mmalcolm crawford <email@hidden>
Subject: Re: Generating default values in a bindings controlled
Tableview
To: Cocoa-Dev Mail <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Apr 15, 2005, at 7:03 AM, Richard Stacpoole wrote:
When I click on the "New Task" button, which is bound to insert, an
instance of the model is created (and values can be put in), but
the default values from the init method never appear. The new row
is completely blank.
Are you sure it's a new Task object? Is the Object Class Name for
the array controller still NSMutableDictionary?
mmalc
Thanks for looking into this.
In IB I have a NSArrayControllerObject called TaskController. In the
inspector panel for that controller the Object Class Name is
NSMutableDictionary and the keys include dueDate and details. The
TaskController is bound to File's Owner (MyDocument).
The relevant part of MyDocument is:
@interface MyDocument : NSDocument
{
IBOutlet NSArrayController *TaskController;
NSMutableArray *taskItems;
....
}
and I have implemented the index accessor methods, and they appear to
work as I can create multiple tasks, make them hold values and load &
save them.
Also thanks for your sample code page it is very helpful
_______________________________________________
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