How does Core Data validate transient attributes?

2014-03-30 Thread Rick Mann
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

Re: How does Core Data validate transient attributes?

2014-03-30 Thread Richard Charles
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

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Colas B
Thanks Mike for your answer. I did more tests. 1) the wrappers are not nil 2) the problem occurs also when creating a file via the write method of NSFileWrapper if I do the following        a) in my packaged file myFolder.myApp, I create a file file1        b) I ask the Finder to show the

Preparation for doing a bug report for CIPageCurlTransition

2014-03-30 Thread Kevin Meaney
No matter how many different ways I look at my code I can't see what I'm doing wrong. So now I've distilled down to its essence the using of the CIPageCurlTransition CoreImage filter. The problem is that the inputBacksideImage value option for the CIPageCurlTransition filter doesn't appear to

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Quincey Morris
On Mar 30, 2014, at 07:26 , Colas B colasj...@yahoo.fr wrote: 2) the problem occurs also when creating a file via the write method of NSFileWrapper if I do the following a) in my packaged file myFolder.myApp, I create a file file1 b) I ask the Finder to show the content of

Re: How does Core Data validate transient attributes?

2014-03-30 Thread 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 ,

Re: How does Core Data validate transient attributes?

2014-03-30 Thread Quincey Morris
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

Re: How does Core Data validate transient attributes?

2014-03-30 Thread Jerry Krinock
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

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Colas B
       d) this time, if I check again the content of myFolder.myApp, I don't see file2 (but file1 is still there) What does “check again” mean? Did you close the window showing the contents of myFolder.myApp, then open another one? Yes, it is what I mean. I don’t understand this.

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Quincey Morris
On Mar 30, 2014, at 14:38 , Colas B colasj...@yahoo.fr wrote: So do you agree that it is strange that I can re-write a folder with ‘NSFileWrapperWritingAtomic’ but not without? According to your earlier description, you seem to have been able to change a folder’s contents either way, but

Re: Preparation for doing a bug report for CIPageCurlTransition

2014-03-30 Thread Graham Cox
Hi Kevin, I have an old project that uses this transition, and as far as I know it works correctly. I haven't got the source to hand though I can dig it up, but running the app here shows a correct curl effect - BUT the proviso would be that I use the same image for the front and back images,

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Colas B
With the  ‘NSFileWrapperWritingAtomic’ option, the re-writing goes well (error = nil). With other options, the re-writing does not go well and there is an error (Error Domain=NSCocoaErrorDomain Code=516 The file “folderName” couldn’t be saved in the folder “Desktop” because a file with the same

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Quincey Morris
On Mar 30, 2014, at 17:02 , Colas B colasj...@yahoo.fr wrote: With the ‘NSFileWrapperWritingAtomic’ option, the re-writing goes well (error = nil). With other options, the re-writing does not go well and there is an error (Error Domain=NSCocoaErrorDomain Code=516 The file “folderName”

Re: Preparation for doing a bug report for CIPageCurlTransition

2014-03-30 Thread Kevin Meaney
Hi Graham, Thanks for replying. I've just tried setting the backside image to be the same as the front image but it still doesn't work. Are you sure you are not using CIPageCurlWidthShadowTransition in your project because that works for me without a problem? Kevin On 30 Mar 2014, at 23:34,

Re: How does Core Data validate transient attributes?

2014-03-30 Thread Rick Mann
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:

Re: How does Core Data validate transient attributes?

2014-03-30 Thread Quincey Morris
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

Re: How does Core Data validate transient attributes?

2014-03-30 Thread Jerry Krinock
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

Re: Preparation for doing a bug report for CIPageCurlTransition

2014-03-30 Thread Graham Cox
On 31 Mar 2014, at 11:59 am, Kevin Meaney k...@yvs.eu.com wrote: Hi Graham, Thanks for replying. I've just tried setting the backside image to be the same as the front image but it still doesn't work. Are you sure you are not using CIPageCurlWidthShadowTransition in your project