FROM : Barry Wilson
DATE : Sun Jun 25 20:13:10 2006
Greetings,
I made a recent change to my application where I implemented
accessors for a NSRect following the code as outlined in the core
data programming guide.
I have two properties, one transient "myRect" and another
"myRectAsDaa" coded exactly as the example code with the rect being
converted into an NSValue and archived into NSData in the set accessor.
The first time I launched my application after making these changes
(not yet storing anything into the property) I noticed a message upon
freeing my document that essentially said "unable to set nil value
for myRect". Now I didn't understand why core data wanted to set a
transient value to nil but I knew how to fix that and added code fin
setNilValueForKey to handle it. Now freeing the document gives me a
failure and message that NSKeyedArchiver cannot encode a struct.
So what is going on here? Should core data be setting this property
to nil in the first place? And is there a problem with archiving
[NSValue valueWithRect:myRect] ?
-Barry
DATE : Sun Jun 25 20:13:10 2006
Greetings,
I made a recent change to my application where I implemented
accessors for a NSRect following the code as outlined in the core
data programming guide.
I have two properties, one transient "myRect" and another
"myRectAsDaa" coded exactly as the example code with the rect being
converted into an NSValue and archived into NSData in the set accessor.
The first time I launched my application after making these changes
(not yet storing anything into the property) I noticed a message upon
freeing my document that essentially said "unable to set nil value
for myRect". Now I didn't understand why core data wanted to set a
transient value to nil but I knew how to fix that and added code fin
setNilValueForKey to handle it. Now freeing the document gives me a
failure and message that NSKeyedArchiver cannot encode a struct.
So what is going on here? Should core data be setting this property
to nil in the first place? And is there a problem with archiving
[NSValue valueWithRect:myRect] ?
-Barry
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

