Re: Strange crashing bug
Re: Strange crashing bug
- Subject: Re: Strange crashing bug
- From: John Timmer <email@hidden>
- Date: Thu, 19 May 2005 17:28:11 -0400
>
> On May 19, 2005, at 10:29 AM, John Timmer wrote:
>
>> If the mother or father key is called for and is nil, the nilValue
>> object is retrieved and returned; this has ³undefined² set for its
>> name value. Using this setup, whenever I try to load a saved file,
>> the application crashes with stack trace 2 below.
>
> How did you implement this?
Very similar to a singleton. All animals have a uniqueID. I simply started
the count at 1 - the "nil animal" has a uniqueID of 0. When it's requested,
I just call it out of the managed object context by a predicate that asks
for uniqueID == 0. If it's not there, I create it, and fill in all
appropriate values.
Incidentally, I thought of trying to implement momName and dadName methods
in my animal class which call through the relationships to grab the name ,
and bind the table to that. Just got back from a seminar, so I'll try that
now....
Cheers,
JT
_______________________________________________
This mind intentionally left blank
_______________________________________________
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