The thing that jumps out at me is that you're directly accessing the instance 
variable myKeys instead of using an accessor.  I'm not sure why you want this 
to be a mutable array, but assuming that, I would use a method like this:

- (NSMutableArray*)myKeys {
    if (!m_myKeys) {
        // Executes on the first invocation only
        myKeys = [[NSMutableArray alloc] init] ;
    }

    return m_myKeys ;
}

then access it with [self myKeys].  Also, remember to [m_myKeys release] in 
your -dealloc method?

>> The way you've now written things will cause your app to crash.  I'll leave 
>> the reason for the crash as an exercise for you to figure out.

Well, does it crash?

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to