Hmm, seems I was misunderstanding what the built-in value transformers
do, and also had a problem with my custom transformer. The
NSUnarchiveFromData transformer won't work for this purpose. However
you can make it possible to store NSValue objects as Core Data
attributes by using a
Actually on Leopard you should be able to store an NSValue as an
attribute, simply by using an attribute of type Transformable, and
setting the Value Transformer Name to NSUnarchiveFromData.
I just tried it though, and it seems like there is a bug which
prevents it from working. Basically
On Thu, Apr 3, 2008 at 4:31 AM, Daniel Thorpe [EMAIL PROTECTED] wrote:
I have gone with using a ...AsString attribute and using NSRectFromString.
Seems to work okay, although I've got no idea if it's the most efficient
method. I think Core Data seems a little limited in that you can't store an
Thanks for the feedback on this.
I have gone with using a ...AsString attribute and using
NSRectFromString. Seems to work okay, although I've got no idea if
it's the most efficient method. I think Core Data seems a little
limited in that you can't store an NSValue object as an attribute,
Hello everyone,
I'm trying to get to grips with non-standard persistent attributes in
Core Data. I've read through the docs I can find (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html
) but I'm still having some issues storing an NSRect in an
On 02.04.2008, at 13:28, Daniel Thorpe wrote:
Hello everyone,
I'm trying to get to grips with non-standard persistent attributes
in Core Data. I've read through the docs I can find (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html
) but I'm
On 02.04.2008, at 18:12, Ben Lachman wrote:
I think the easiest way to encode/decode NSRects for storage is
NSStringFromRect() and NSRectFromString(). Then you can just
implement a custom accessor for the property that converts in the
direction you need.
That potentially means opening
On 02.04.2008, at 18:58, Thomas Engelmeier wrote:
That potentially means opening Pandoras can to localisation issues.
Any time you go that route, be sure to check that code with
switching decimal separators.
Potentially? Maybe. But I just tried it, and for me
NSStringFromRect() never