Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?

2014-01-18 Thread Jerry Krinock
In a post today in the Developer Forums [1], developer Romain Piveteau mentioned in discussing another topic that, in a Core Data app, he “can not disable journaling mode” (by which I presume he means that setting the journaling mode to the legacy “rollback” mode [2] is ineffective) when the u

System fonts on iOS 7

2014-01-18 Thread Gideon King
I am trying to display font information on the user interface of my application, and have come across some hidden fonts that are obviously there in the system, but not listed in the UIFont familyNames. This can happen when the user has pasted rich text into my application and it is in a hidden s

Re: System fonts on iOS 7

2014-01-18 Thread Jens Alfke
On Jan 18, 2014, at 5:58 PM, Gideon King wrote: > We have the seemingly impossible situation where the text is drawn in a font > face that is not in the list returned by [UIFont familyNames]. Fonts with names prefixed with a "." or "%" are hidden from the higher-level APIs for listing fonts.

Binding not setting model property

2014-01-18 Thread Roland King
I have a model object with a codeURL property which is readwrite and is an NSURL. I have an NSTextField in the NSView subclass with the value bound to the codeURL property with a custom transform which turns a URL into a string (and deals with nil and another edge case). The transform is rev

Re: Binding not setting model property

2014-01-18 Thread Roland King
... and I tried expressing the URL as an NSString property too, with no transform. Similarly calling [ textField setStringValue: ] didn't cause the setter in the model object to be invoked. That surprised me, I thought binding an NSTextField to an NSString in the model object would be a very si

Re: Binding not setting model property

2014-01-18 Thread Dave Fernandes
How are you setting up the binding? Normally you bind to the value property of the NSTextField (not stringValue). See Cocoa Bindings Reference (NSTextField Bindings). On Jan 18, 2014, at 9:41 PM, Roland King wrote: > I have a model object with a codeURL property which is readwrite and is an >

Re: System fonts on iOS 7

2014-01-18 Thread Gideon King
Ah, interesting to know that, thanks Jens. Yes, I guess I could leave it unchecked. But also my files are used cross-platform, so I would prefer to store font information for standard fonts, so will probably do the translation to standard fonts during pasting anyway. Regards Gideon > Fonts w

Re: Binding not setting model property

2014-01-18 Thread Roland King
Yes I've bound to the value property in IB. That gets the value from the model object into my NSTextField perfectly via the transformer. It reads the underlying NSURL property which it's bound to, applies the transformer, and sets the text into the NSTextField (presumably by setting the stringVa

Re: Binding not setting model property

2014-01-18 Thread Roland King
.. right so if I actually edit the NSTextField on-screen (it wasn't editable before, I made it so) *THEN* the binding gets called in the way I expected. So it would seem that only a user-initiated change of the value fires the binding in reverse (which is what the example binding code in the Ap

Re: Binding not setting model property

2014-01-18 Thread Quincey Morris
On Jan 18, 2014, at 19:45 , Roland King wrote: > So perhaps the question is .. what property do I need to set on the > NSTextField to get it to go back the other way? I've tried [ textField > setValue:.. ] but that just throws an exception that setValue: isn't > implemented on NSTextField, whi

Re: Binding not setting model property

2014-01-18 Thread Roland King
On 19 Jan, 2014, at 12:25 pm, Quincey Morris wrote: > On Jan 18, 2014, at 19:45 , Roland King wrote: > >> So perhaps the question is .. what property do I need to set on the >> NSTextField to get it to go back the other way? I've tried [ textField >> setValue:.. ] but that just throws an ex

Re: Binding not setting model property

2014-01-18 Thread Quincey Morris
On Jan 18, 2014, at 20:39 , Roland King wrote: > Really does look like the binding code only fires for at the end of > ..didFinishEditing: and not for any programatic set of any property on the > object, at least not one I've been able to find. That actually makes a lot of sense. It’s quite p

iOS 7 downloadable fonts

2014-01-18 Thread Gideon King
Hi, I am trying to use CTFontDescriptorMatchFontDescriptorsWithProgressHandler to download a font. It appears to download fine, and I can display it in my application. [UIFont familyNames] includes that font. I restart my application, and [UIFont familyNames] does not include the downloaded fon

Re: Binding not setting model property

2014-01-18 Thread Roland King
> > In practice, I never do it that way any more. I always create a derived > property on the view or window controller that’s based on the data model > property. So, from the views’ point of view, the view/window controller *is* > the data model, but it’s insulated from the real data model. (

Re: Binding not setting model property

2014-01-18 Thread Quincey Morris
On Jan 18, 2014, at 22:44 , Roland King wrote: > What derived property can I write on the view which removes that dependency? On Jan 18, 2014, at 20:54 , Quincey Morris wrote: > create a derived property on the view or window controller that’s based on > the data model property Sorry, what