Re: What the actual heck?

2014-04-15 Thread Kyle Sluder
On Tue, Apr 15, 2014, at 09:19 PM, Bryan Vines wrote: > Hi folks. > > So I just got a “Mailing list removal confirmation notice” which said the > list had received a request from a 17.x.x.x address for the removal of my > email address from this list. > > Anyone else getting something like this?

Re: What the actual heck?

2014-04-15 Thread Bryan Vines
Lee Ann, Ah, OK. It’s kind of creepy/scary/funny all at the same time. Thanks for the reassurance. — Bryan On Apr 15, 2014, at 11:22 PM, Lee Ann Rucker wrote: > This happened a while back too, IIRC it's bogus and nothing will happen. ___ Cocoa-dev

Re: What the actual heck?

2014-04-15 Thread Lee Ann Rucker
This happened a while back too, IIRC it's bogus and nothing will happen. - Original Message - From: "Bryan Vines" To: "Cocoa Developers" Sent: Tuesday, April 15, 2014 9:19:35 PM Subject: What the actual heck? Hi folks. So I just got a “Mailing list removal confirmation notice” which sa

What the actual heck?

2014-04-15 Thread Bryan Vines
Hi folks. So I just got a “Mailing list removal confirmation notice” which said the list had received a request from a 17.x.x.x address for the removal of my email address from this list. Anyone else getting something like this? Plot twist: The 17.x.x.x netblock belongs to Apple. “The call is

Re: NSTextView Text Length

2014-04-15 Thread Gordon Apple
Ah. Somehow, I totally missed the fact that NSText has its own delegate protocol. That did it. Thanks. On 4/15/14 7:20 PM, "Graham Cox" wrote: > > On 16 Apr 2014, at 9:57 am, Gordon Apple wrote: > >> > Is there any way to get a notification or set an observer on NSTextView¹s >> > used text

Re: NSTextView Text Length

2014-04-15 Thread Graham Cox
On 16 Apr 2014, at 9:57 am, Gordon Apple wrote: > Is there any way to get a notification or set an observer on NSTextView¹s > used text length? After much research, I have not found a way other than to > pole the layout manager for usedRectForTextContainer. The delegate is sent -textDidChange

NSTextView Text Length

2014-04-15 Thread Gordon Apple
Is there any way to get a notification or set an observer on NSTextView¹s used text length? After much research, I have not found a way other than to pole the layout manager for usedRectForTextContainer. This must exist internally because the textView has to communicate with the containing scrollVi

Re: Fast NSArray compare

2014-04-15 Thread Varun Chandramohan
To summarise what was discussed, - I think the folder hierarchy problem is easily solvable as I always traverse from top of the tree. If an entry for one of the folders is found in my set I stop the traversal to lower leaves of the tree. - I would be using NSSet to store my “restrict list”. Howeve

Re: Fast NSArray compare

2014-04-15 Thread Charles Srstka
On Apr 14, 2014, at 9:01 PM, Ken Thomases wrote: > You should obtain the resource identifier object of each URL using > -getResourceValue:forKey:error: with NSURLFileResourceIdentifierKey, then > compare those two objects using -isEqual:. One thing to watch out for, though: the object returned

Re: Fast NSArray compare

2014-04-15 Thread Gary L. Wade
Also, if your folder hierarchy, traversal code, and checks can deal well with it, you¹ll get better performance by short-circuiting based on upper directory checks. For example, if you know you¹re in /Downloads, don¹t compare against /Documents/AboutUs.pdf. Just use the /Documents set of file obje

Re: Fast NSArray compare

2014-04-15 Thread Jens Alfke
On Apr 15, 2014, at 7:45 AM, Alex Zavatone wrote: > A good approach here would be to make a test case for NSArray and NSSet, a > known set of files and simply test now long each takes. In general I agree that it’s a good idea to test before optimizing. It’s common for people here to start obs

Re: Remove redundant AM/PM when formatting a time range?

2014-04-15 Thread Ben Kazez
>> I’m trying to create a compact time range format, like “2am-4pm” or >> “2-5:30pm”. I am constructing the format string using >> -dateFormatFromTemplate:options:locale:, omitting the minutes from the >> template if that component is zero. Is there an internationalization-safe >> way that I ca

Re: Fast NSArray compare

2014-04-15 Thread ChanMaxthon
Another wild thought, how about drop one layer lower to POSIX and use a little bit of OpenCL? For every directory with content paths C[0..i] and the list of restricted paths R[0..j] construct a matrix (using OpenCL) M[0..i, 0..j] where M[i, j]=strcmp(C[i], R[j]) (strcmp() itself can be OpenCL co

Re: Fast NSArray compare

2014-04-15 Thread ChanMaxthon
To keep your NSSet you can store it as an array. There are conversion methods like -[NSSet array] and +[NSSet setWithContentsOfArray:]. Also, you can try to determine if your code is running on SSD. SSD can be iterated in parallel and GCD will help a little when parallelizing the search. Sent f

Re: Fast NSArray compare

2014-04-15 Thread Alex Zavatone
A good approach here would be to make a test case for NSArray and NSSet, a known set of files and simply test now long each takes. On Apr 14, 2014, at 8:59 PM, Graham Cox wrote: > > On 15 Apr 2014, at 10:02 am, Varun Chandramohan > wrote: > >> Lets say I walkthrough 1000 files and folders,

NSTextFinder vs NSTableView -- mano a mano showdown

2014-04-15 Thread Ben Golding
I was wondering whether anyone has managed to get NSTextFinder to work with NSTableView so that it will search through the table contents, highlighting the fields that match. The NSTextFinder documentation is difficult to understand and mixes its use searching with NSTextView in with the more

Re: Fast NSArray compare

2014-04-15 Thread John Brownie
On Tue Apr 15 2014 12:41:50 GMT+1000 (PGT) Graham Cox wrote: On 15 Apr 2014, at 12:03 pm, John Brownie wrote: think you're an order of magnitude out. Searching an array is linear with the length of the array, O(n), whereas a set or hash should be close to constant, O(1), if there's not a b