Skip navigation.
 
mlRe: Generating default values in a bindings controlled
FROM : Richard Stacpoole
DATE : Sat Apr 16 09:24:21 2005

> Message: 15
> Date: Fri, 15 Apr 2005 14:34:32 -0700
> From: mmalcolm crawford <<email_removed>>
> Subject: Re: Generating default values in a bindings controlled
>     Tableview
> To: Cocoa-Dev Mail <<email_removed>>
> Message-ID: <<email_removed>>
> 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

Related mailsAuthorDate
mlRe: Generating default values in a bindings controlled Richard Stacpoole Apr 16, 09:24
mlRe: Generating default values in a bindings controlled mmalcolm crawford Apr 16, 09:33