Skip navigation.
 
mlRe: NSArrayController - Mutability lost?
FROM : Diggory Laycock
DATE : Sat Apr 16 19:32:12 2005

On 16 Apr 2005, at 5:01 pm, mmalcolm crawford wrote:

>
> On Apr 16, 2005, at 6:50 AM, Diggory Laycock wrote:
>

>>    I have an class which is a preference pane's main class - let's
>> call it MyPrefPane.  It has an NSMutableArray called 'tickets'.
>>    I also have an NSArrayController, whose contentArray is bound to
>> the tickets array of the MyPrefPane class.
>>

>
> Is the array at some stage retrieved from user defaults?
>
> See <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>
>    -> NSUserDefaultsController
>    -> Arrays
>
> mmalc


Hmm - no, the array isn't touched by UserDefaults at all - I read the
thread on that - interesting, and similar - but we're just using an
ArrayController here.

Perhaps Uli's vauleTransformer from the example you linked could be
useful here - to turn the Array back into into a MutableArray.

I still think it's odd that the controller appears to be altering the
class of my model's property.


Diggory Laycock
-----------------------
http://www.monkeyfood.com

Related mailsAuthorDate
mlNSArrayController - Mutability lost? Diggory Laycock Apr 16, 15:50
mlRe: NSArrayController - Mutability lost? mmalcolm crawford Apr 16, 18:01
mlRe: NSArrayController - Mutability lost? Diggory Laycock Apr 16, 19:32
mlRe: NSArrayController - Mutability lost? mmalcolm crawford Apr 16, 22:32