Re: dateFromString won't accept this string:

2015-11-22 Thread Alex Hall
> On Nov 22, 2015, at 6:04 PM, Alex Hall wrote: > > >> On Nov 22, 2015, at 5:06 PM, Jerry Krinock wrote: >> >> >>> On 2015 Nov 22, at 13:12, Alex Hall wrote: >>> >>> Is there something else I have to do, like tell the formatter what

Re: Cocoa-dev Digest, Vol 12, Issue 601

2015-11-22 Thread Motti Shneor
On 19 באוק 2015, at 20:13, cocoa-dev-requ...@lists.apple.com wrote: > I’ve got a weird problem in an OS X app project I’m dusting off after a long > hiatus. Every time the app launches, it pops up error alerts saying it can’t > open two documents. The underlying problem is that the files for

Re: Bunch of CoreData based NSDocument questions.

2015-11-22 Thread Quincey Morris
On Nov 22, 2015, at 22:41 , Motti Shneor wrote: > I wish I knew enough to write my own MyPersistentDocument The problem is that the way NSDocuments are used is semantically different from the way databases are used, and you *cannot* reconcile the two across all the

Re: dateFromString won't accept this string:

2015-11-22 Thread Jerry Krinock
> On 2015 Nov 22, at 21:12, Alex Hall wrote: > I'd still be curious to know about templates, but this works so I won't > spend time on it right now. The answer, with an example of why you might want to use templates, is explained in Data Formatting Programming Guide >

Re: Bunch of CoreData based NSDocument questions.

2015-11-22 Thread Motti Shneor
On 22 בנוב 2015, at 23:23, Quincey Morris wrote: > On Nov 22, 2015, at 11:44 , Motti Shneor wrote: >> >> 1. My app supports autosave in-place. This means each "save" practically >> recreates the whole document as temporary file, then replaces the document >> with the new

Re: dateFromString won't accept this string:

2015-11-22 Thread Alex Hall
> On Nov 22, 2015, at 5:06 PM, Jerry Krinock wrote: > > >> On 2015 Nov 22, at 13:12, Alex Hall wrote: >> >> Is there something else I have to do, like tell the formatter what order to >> expect components to be in? > > Yes, and more. You must set the

Bunch of CoreData based NSDocument questions.

2015-11-22 Thread Motti Shneor
Hi Everyone. I develop a Docuent-based Mac application for scientific use, using the BSManagedDocument open-source, which provides many of the modern behaviors of UIManagedDocument on Mac (whereas NSPersistentDocument has been neglected for ages). Mainly what I wanted from BSManagedDocument

dateFromString won't accept this string:

2015-11-22 Thread Alex Hall
Hey list, I’m using NSDateFormatter.dateFromString() to make a date from the date string in a tweet. However, it seems to be returning nil, and I’m not sure why. Is there something else I have to do, like tell the formatter what order to expect components to be in? The string is something like:

Re: Bunch of CoreData based NSDocument questions.

2015-11-22 Thread Quincey Morris
On Nov 22, 2015, at 11:44 , Motti Shneor wrote: > > 1. My app supports autosave in-place. This means each "save" practically > recreates the whole document as temporary file, then replaces the document > with the new one. Such behavior is reasonable for a relatively small

Re: dateFromString won't accept this string:

2015-11-22 Thread Jerry Krinock
> On 2015 Nov 22, at 13:12, Alex Hall wrote: > > Is there something else I have to do, like tell the formatter what order to > expect components to be in? Yes, and more. You must set the dateFormat property of your date formatter exactly. Documentation of property