Re: Non-deprecated way to determine Process Type (LSUIElement etc.) ?

2015-11-27 Thread Jerry Krinock
> On 2015 Nov 26, at 23:33, Ken Thomases wrote: > > Don't use NSRunningApplication when NSApplication will do. Oh, thank you Ken – that’s even better. NSApplication has the same ‘activationPolicy’ property. > The replacement for TransformProcessType() is -[NSApplication > setActivationPolic

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-27 Thread Gary L. Wade
Although I have experience with your performance hit, one solution I would probably try when it becomes important again for me would be to do this: 1. Using the BSD layer of APIs, see if the file (alias files are regular files from a statfs call, even folder aliases) has an extended attribute na

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-27 Thread Quincey Morris
On Nov 27, 2015, at 14:00 , Leonardo wrote: > > The problem is that the IsAliasNew method is 3.7 times slower than the > IsAliasOld method. Do you know a way to accomplish that with a faster > method? It may not be faster but it’s probably more correct to use [NSURL getResourceValue:forKey:erro

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-27 Thread Sean McBride
On Fri, 27 Nov 2015 23:00:16 +0100, Leonardo said: >The problem is that the IsAliasNew method is 3.7 times slower than the >IsAliasOld method. Do you know a way to accomplish that with a faster >method? Maybe try NSURL's getResourceValue:forKey:error: with NSURLIsAliasFileKey. Cheers, -- _

FSIsAliasFile deprecated - typeOfFile is slow

2015-11-27 Thread Leonardo
Hi, I actually detect whether a file is an alias this way: I use a NSString category where self is the filePath. - (BOOL)IsAliasOld { FSRefsourceRef; OSErrerr = [self GetFSRef:&sourceRef]; if(err) return NO; BooleanisFSDirectory, aliasFileFlag; err =

Re: Caching CIContext?

2015-11-27 Thread Kevin Meaney
I can imagine the possibility when the window is in the background with no part of the window visible that if the system is under memory pressure (System or GPU) that the backing store might be discarded which would then invalidate your CIContext. You could save the pointer to the CGContext at

Caching CIContext?

2015-11-27 Thread thatsanicehatyouhave
Hi, I have an NSImageView with a custom drawing routine. It works as expected most of the time, but sometimes the image is not drawn - the reason was not obvious. Once when this happened, I opened a popover window and saw that image drawn in its background, so it appears I’m doing something inc

Re: Bunch of CoreData based NSDocument questions.

2015-11-27 Thread Quincey Morris
On Nov 26, 2015, at 22:41 , Motti Shneor wrote: > > So -- I MUST warn him and allow him to cancel this quit command. > unfortunately, the @$@$@ NSDocument architecture insists I'm not to be > involved, and shortcuts even the ApplicationDelegate > "applicationShouldTerminate" for me, happily au