I have custom CGRect and CGPoint attributes that are not optional. I'm getting
validation errors that they aren't set. I back them with four and two doubles,
respectively, which ARE optional.
How does Core Data decide that a custom, transient, undefined attribute is or
is not set?
--
Rick
Perhaps setNilValueForKey: from the NSKeyValueCoding protocol maybe useful.
This method is called on modeled properties that are scalars or structures.
Perhaps you need to explicitly set these values in awakeFromInsert and
awakeFromFetch.
Richard
On Mar 30, 2014, at 3:54 AM, Rick Mann
Hmm. That doesn't seem to be it. In my situation, the values are being set to
something, not being set to nil (they're accessed via property accessors, which
take scalars). For some reason, Core Data thinks they're nil, and so I was
asking how it decides that.
On Mar 30, 2014, at 05:27 ,
On Mar 30, 2014, at 13:03 , Rick Mann rm...@latencyzero.com wrote:
In my situation, the values are being set to something, not being set to nil
(they're accessed via property accessors, which take scalars). For some
reason, Core Data thinks they're nil, and so I was asking how it decides
On 2014 Mar 30, at 13:03, Rick Mann rm...@latencyzero.com wrote:
For some reason, Core Data thinks they're nil, and so I was asking how it
decides that.
In your original message, you refer to these non-optional properties being
“backed by” optional scalars. To answer your question, I think
On Mar 30, 2014, at 14:14 , Jerry Krinock je...@ieee.org wrote:
In your original message, you refer to these non-optional properties being
“backed by” optional scalars. To answer your question, I think one would need
to know exactly what “backed by” means. I don’t.
This is what I'm doing:
On Mar 30, 2014, at 18:38 , Rick Mann rm...@latencyzero.com wrote:
The docs about custom attributes show backing those transient attributes with
an iVar as a cache, and then writing or reading from the real attribute
either during access or during fetch/save (as you mention in 4ab). I don't
On 2014 Mar 30, at 18:38, Rick Mann rm...@latencyzero.com wrote:
This is what I'm doing:
http://pastebin.com/BfzgTfiE
I don’t see any line of code in there where you’re setting the primitive value
of ‘bounds’ or ‘position’. Study that NSColor example referenced by Quincey.
At the