Skip navigation.
 
mlRe: Loading saved file into NSArrayController
FROM : Hans van der Meer
DATE : Sat Feb 16 18:34:42 2008

On 16 feb 2008, at 16:14, Mike Abdullah wrote:

>
> On 11 Feb 2008, at 15:51, Davide Scheriani wrote:
>

>> well,
>> the NSArrayController is bound to an array in MyDocument class file.
>> When I get back my datas from the file I reafill the array and the 
>> NSArrayC should update
>> the datas.But I dont see doing this.
>> Ill have a look into the documentation of MVC anw...

>
> Ah, in which case then I suspect you are not refilling the 
> document's array in a KVC-compliant manner. Care to post some sample 
> code?
>


It might be of use to remember that changes within an NSMutableArray 
(addObject, remove...) do not by themselves lead tot calling the 
class's observers. I found it useful to bracket the changes in this 
manner:
[self willChangeValueForKey:@"theArray"];
  // changes to the contents of the array
[self didChangeValueForKey:@"theArray"];

Hope this helps.

Hans van der Meer

Related mailsAuthorDate
mlLoading saved file into NSArrayController Davide Scheriani Feb 11, 14:28
mlRe: Loading saved file into NSArrayController Mike Abdullah Feb 11, 14:59
mlRe: Loading saved file into NSArrayController Davide Scheriani Feb 11, 16:51
mlRe: Loading saved file into NSArrayController Mike Abdullah Feb 16, 16:14
mlRe: Loading saved file into NSArrayController Hans van der Meer Feb 16, 18:34
mlRe: Loading saved file into NSArrayController mmalc crawford Feb 17, 03:25
mlRe: Loading saved file into NSArrayController Hans van der Meer Feb 18, 10:26
mlRe: Loading saved file into NSArrayController Mike Abdullah Feb 18, 11:35
mlRe: Loading saved file into NSArrayController Davide Scheriani Feb 18, 12:01
mlRe: Loading saved file into NSArrayController Hans van der Meer Feb 18, 21:18
mlRe: Loading saved file into NSArrayController mmalc crawford Feb 18, 21:24
mlRe: Loading saved file into NSArrayController mmalc crawford Feb 18, 21:28