Re: Bunch of CoreData based NSDocument questions.

2015-11-23 Thread Ernesto Giannotta
Have you tried this (in your Persistent document subclass)? - (void)close { // we're about to close this document but we have to do some housekeeping [self cleanup]; [super close]; } > On 23-Nov-2015, at 07:41, Motti Shneor wrote: > > Problem is - the application quits immedia

Re: AppleEvents: Send port for process has no send right, port=( port:37207/0x9157 rcv:1,send:0,d:0 limit:5) (findOrCreate()/AEMachUtils.cp #526)

2015-11-23 Thread has
John MacMullin wrote: > Anyone have an idea of what is causing this message in the log file? > > AppleEvents: Send port for process has no send right, port=( port:37207/0x9157 rcv:1,send:0,d:0 limit:5) (findOrCreate()/AEMachUtils.cp #526) Nope, although you're obviously not the only one. Give

Re: dateFromString won't accept this string:

2015-11-23 Thread Sandor Szatmari
Alex, Have you tried looking at NSDataDetector. http://nshipster.com/nsdatadetector/ Sandor > On Nov 22, 2015, at 16:12, Alex Hall wrote: > > 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

Re: dateFromString won't accept this string:

2015-11-23 Thread Alex Hall
> On Nov 23, 2015, at 8:00 AM, Sandor Szatmari > wrote: > > Alex, > > Have you tried looking at NSDataDetector. > http://nshipster.com/nsdatadetector/ Thanks for the suggestion. I don't think that would apply here, though; I have some JSON data that inc

Re: dateFromString won't accept this string:

2015-11-23 Thread Alex Zavatone
Have you looked into The spec for date formatting? It is seriously helpful. It's some ISO document. Specify the format at which the date is coming in and it should convert. I will send you my crappy routines for this for iOS. Sent from my iPhone > On Nov 23, 2015, at 9:06 AM, Alex Hall wrot

Re: Bunch of CoreData based NSDocument questions.

2015-11-23 Thread Motti Shneor
> On Nov 23, 2015, at 09:23, Quincey Morris > wrote: > > 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

Re: dateFromString won't accept this string:

2015-11-23 Thread Sandor Szatmari
Alex, What spec are you referring to? Link? I was playing around with NSDataDetector for pulling dates out of strings in XML dumps of excel files for an internal tool I was writing. NSDataDetectors seemed powerful, but failed when the dates weren't totally well formed (Tested on 10.8.5, SDK

Re: dateFromString won't accept this string:

2015-11-23 Thread Alex Hall
> On Nov 23, 2015, at 4:32 PM, Sandor Szatmari > wrote: > > Alex, > > What spec are you referring to? Link? I was playing around with > NSDataDetector for pulling dates out of strings in XML dumps of excel files > for an internal tool I was writing. NSDataDetectors seemed powerful, but >

Re: Bunch of CoreData based NSDocument questions.

2015-11-23 Thread Quincey Morris
On Nov 23, 2015, at 12:50 , Motti Shneor wrote: > > Any references to that old discussion? I’d like to read it. However, I think > there should be a reasonable way to provide close-enough interpretation to > NSDocument’s view of documents using CoreData's persistence. Database here is > only m

Re: dateFromString won't accept this string:

2015-11-23 Thread Alex Zavatone
There is some ISO spec for date formatting that Apple’s docs mention IIRC. Let me sniff around. http://www.w3.org/TR/NOTE-datetime Also, from Apple’s docs: “ The format string uses the format patterns from the Unicode Technical Standard #35” Don’t go there. It will hurt you. I’ve added a gr

Re: dateFromString won't accept this string:

2015-11-23 Thread Shane Stanley
On 24 Nov 2015, at 9:26 AM, Alex Zavatone wrote: > > Here’s a pretty good (really really good) reference: Except it's out-of-date. -- Shane Stanley ___ Cocoa-dev

Making custom table cells for view-based tables on mac?

2015-11-23 Thread Alex Hall
Hello list, My Twitter app is working well with its Cocoa bindings and default table cells, but I want to do more with said table cells. Right now, I put *all* the text into the cell's label, which works fine. I'd like to put the sender, tweet text, and timestamp each in their own fields, though

Question about getBytes:length:

2015-11-23 Thread Eric E. Dolecki
I have a bit of old code someone else wrote. I get warnings since getBytes is deprecated since iOS 8. I don't know enough about this but would like to use the *getBytes:length:* to turn them off. How would I get a length from something like this? This is part of code I've bridged into a Swift proje

RE: Question about getBytes:length:

2015-11-23 Thread Lee Ann Rucker
[UUID1.data getBytes:b1 length:16] since that's the size of your buffer. Doc says "The number of bytes copied is the smaller of the length parameter and the length of the data encapsulated in the object." From: cocoa-dev-bounces+lrucker=vmware@lists.a

Re: Question about getBytes:length:

2015-11-23 Thread Eric E. Dolecki
Thank you very much! On Mon, Nov 23, 2015 at 11:00 PM Lee Ann Rucker wrote: > [UUID1.data getBytes:b1 length:16] > since that's the size of your buffer. Doc says "The number of bytes copied > is the smaller of the length parameter and the length of the data > encapsulated in the object." >

Re: Question about getBytes:length:

2015-11-23 Thread Charles Srstka
> On Nov 23, 2015, at 9:55 PM, Eric E. Dolecki wrote: > > -(int) compareCBUUIDToInt:(CBUUID *)UUID1 UUID2:(UInt16)UUID2 > { >char b1[16]; > * [UUID1.data getBytes:b1]; //<---* >UInt16 b2 = [self swap:UUID2]; >if (memcmp(b1, (char *)&b2, 2) == 0) >return 1; >else >

Re: Question about getBytes:length:

2015-11-23 Thread Eric E. Dolecki
That method is not my code so I can't speak to it. It's from a github example from a company supplying BT shields for Arduino. On Mon, Nov 23, 2015 at 11:57 PM Charles Srstka wrote: > On Nov 23, 2015, at 9:55 PM, Eric E. Dolecki wrote: > > -(int) compareCBUUIDToInt:(CBUUID *)UUID1 UUID2:(UInt16

Re: Question about getBytes:length:

2015-11-23 Thread Charles Srstka
> On Nov 23, 2015, at 11:04 PM, Eric E. Dolecki wrote: > > That method is not my code so I can't speak to it. It's from a github example > from a company supplying BT shields for Arduino. > > On Mon, Nov 23, 2015 at 11:57 PM Charles Srstka > wrote: >> On Nov 23

Re: Making custom table cells for view-based tables on mac?

2015-11-23 Thread Quincey Morris
On Nov 23, 2015, at 16:06 , Alex Hall wrote: > > When I look at the cell I got by default, it has a lot of levels to it. I'm > not sure where to add my own views, or how to assign a separate view > controller to the cell (just for modularity's sake). What I see is this: > > Tweet cell contains

Re: Bunch of CoreData based NSDocument questions.

2015-11-23 Thread Motti Shneor
> On Nov 24, 2015, at 00:14, Quincey Morris > wrote: > > On Nov 23, 2015, at 12:50 , Motti Shneor > wrote: >> >> Any references to that old discussion? I’d like to read it. However, I think >> there should be a reasonable way to provide close-enough interpretation