Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 12:46, Stephane Sudre wrote: > I will file one because I consider that even if LSUIElement is set, it's > still an application (otherwise there would no point in returning an running > application instance when launched using NSWorkspace APIs) Although you are correct (a "r

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Alex Zavatone
On Jul 31, 2013, at 4:01 PM, Greg Parker wrote: > On Jul 31, 2013, at 12:28 PM, Vincent Habchi wrote: >> David Duncan wrote: >>> Why would there be? Your just asking for a mutable copy of an empty string. >>> It should be equivalent to [[NSMutableString alloc] initWithString:@« »] >> >> But m

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Le 31 juil. 2013 à 22:38, Greg Parker a écrit : > Not necessarily. If you have long string and you want to clear it and re-fill > it with another long string, then it may be faster to use > -deleteCharactersInRange: in order to avoid memory re-allocation overhead. > But that possibility depend

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Sandor Szatmari
Why not [aMutableString setString:@""];? Sandor Szatmari On Jul 31, 2013, at 16:32, Vincent Habchi wrote: > Greg, > > thanks for diverting some of your time testing this. As someone already > commented, the results are somehow consistent with “common sense”, whatever > that means (cf. below)

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Greg Parker
On Jul 31, 2013, at 1:32 PM, Vincent Habchi wrote: > Greg Parker wrote: >> ARC and non-ARC scores are the same within measurement noise, except for >> [NSMutableString string] where ARC can optimize the autoreleased return >> value so the test doesn't need to spin the autorelease pool. Note th >

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Greg, thanks for diverting some of your time testing this. As someone already commented, the results are somehow consistent with “common sense”, whatever that means (cf. below). > ARC and non-ARC scores are the same within measurement noise, except for > [NSMutableString string] where ARC can

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Gary L. Wade
On 7/31/2013 1:01 PM, "Greg Parker" wrote: >Simple alloc/init is the fastest: > >100 [[[NSMutableString alloc] init] release] >102 [[NSMutableString new] release] >109 [NSMutableString string] // ARC enabled >117 [[@"" mutableCopy] release] >119 @autoreleasepool { [NSMutableString string];

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Greg Parker
On Jul 31, 2013, at 12:28 PM, Vincent Habchi wrote: > David Duncan wrote: >> Why would there be? Your just asking for a mutable copy of an empty string. >> It should be equivalent to [[NSMutableString alloc] initWithString:@« »] > > But much slower I expect, since it creates a NSString, takes a

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Fritz Anderson
On 31 Jul 2013, at 2:28 PM, Vincent Habchi wrote: > Thanks to all for answering, > >> Why would there be? Your just asking for a mutable copy of an empty string. >> It should be equivalent to [[NSMutableString alloc] initWithString:@« »] > > But much slower I expect, since it creates a NSStri

Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Peter Ammon
On Jul 31, 2013, at 9:28 AM, Jerry Krinock wrote: > > On 2013 Jul 31, at 06:32, Stephane Sudre wrote: > >> Is it a known bug that the NSWorkspaceDidTerminateApplicationNotification >> notification is not >> sent for applications whose LSUIElement key is set to YES? > > The *behavior* is kno

Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Stephane Sudre
I will file one because I consider that even if LSUIElement is set, it's still an application (otherwise there would no point in returning an running application instance when launched using NSWorkspace APIs) On Wed, Jul 31, 2013 at 6:28 PM, Jerry Krinock wrote: > > On 2013 Jul 31, at 06:32, Step

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Sandor Szatmari
I think there are some overlooked subtleties as @"" is a string literal. Retain and release are pretty much meaningless to it. Sandor Szatmari On Jul 31, 2013, at 15:28, Vincent Habchi wrote: > Thanks to all for answering, > >> Why would there be? Your just asking for a mutable copy of an em

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Thanks to all for answering, > Why would there be? Your just asking for a mutable copy of an empty string. > It should be equivalent to [[NSMutableString alloc] initWithString:@« »] But much slower I expect, since it creates a NSString, takes a mutable copy, then implicitly releases the consta

Re: Search options

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 11:29, Ken Thomases wrote: > I haven't worked with it, but I think that the searchfs() system call is what > underlies those routines at the BSD/POSIX layer. > https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/searchfs.2.html Interesting.

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Ken Thomases
On Jul 31, 2013, at 1:45 PM, Fritz Anderson wrote: > On 31 Jul 2013, at 1:28 PM, David Duncan wrote: > >> On Jul 31, 2013, at 11:25 AM, Vincent Habchi wrote: >> >>> >>> Le 31 juil. 2013 à 20:15, Mike Abdullah a écrit : >>> > I apologize if this question looks stupid or contrived. Here i

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Fritz Anderson
On 31 Jul 2013, at 1:28 PM, David Duncan wrote: > On Jul 31, 2013, at 11:25 AM, Vincent Habchi wrote: > >> >> Le 31 juil. 2013 à 20:15, Mike Abdullah a écrit : >> I apologize if this question looks stupid or contrived. Here it is: is it permissible to use [@“” mutableCopy] to init

Re: Search options

2013-07-31 Thread Ken Thomases
On Jul 31, 2013, at 11:52 AM, Jerry Krinock wrote: > On 2013 Jul 31, at 08:45, dangerwillrobinsondan...@gmail.com wrote: > >> what are the recommended search facilities for searching for things not >> indexed by Spotlight? Or am I limited to task wrappers or NSFileManager >> directory enumerat

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread David Duncan
On Jul 31, 2013, at 11:25 AM, Vincent Habchi wrote: > > Le 31 juil. 2013 à 20:15, Mike Abdullah a écrit : > >>> I apologize if this question looks stupid or contrived. Here it is: is it >>> permissible to use [@“” mutableCopy] to initialize (or reset) a >>> NSMutableString instead of the mor

Re: Search options

2013-07-31 Thread Jean-Daniel Dupas
Le 31 juil. 2013 à 18:52, Jerry Krinock a écrit : > > On 2013 Jul 31, at 08:45, dangerwillrobinsondan...@gmail.com wrote: > >> what are the recommended search facilities for searching for things not >> indexed by Spotlight? Or am I limited to task wrappers or NSFileManager >> directory enum

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Le 31 juil. 2013 à 20:15, Mike Abdullah a écrit : >> I apologize if this question looks stupid or contrived. Here it is: is it >> permissible to use [@“” mutableCopy] to initialize (or reset) a >> NSMutableString instead of the more classical [[NSMutableString alloc] init]? > > Yes. Thanks!

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Mike Abdullah
On 31 Jul 2013, at 19:09, Vincent Habchi wrote: > Folks, > > I apologize if this question looks stupid or contrived. Here it is: is it > permissible to use [@“” mutableCopy] to initialize (or reset) a > NSMutableString instead of the more classical [[NSMutableString alloc] init]? Yes.

Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Folks, I apologize if this question looks stupid or contrived. Here it is: is it permissible to use [@“” mutableCopy] to initialize (or reset) a NSMutableString instead of the more classical [[NSMutableString alloc] init]? Thanks a lot! Vincent ___

Re: Connect to Server on LAN over WiFI

2013-07-31 Thread koko
On Jul 31, 2013, at 11:56 AM, Alex Zavatone wrote: > URL Loading System Programming Guide Just what I was looking for … thanks! -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Connect to Server on LAN over WiFI

2013-07-31 Thread Alex Zavatone
Well, for one, you've got to start by telling us what type of "server" it is. AFP, HTTP, SMB, VNC, WebDAV, SQL/PHP, what kind of "server" do you want to talk to and what kind of tasks do you expect to do? You may want to read up on the URL Loading System Programming Guide and the File System

Re: Connect to Server on LAN over WiFI

2013-07-31 Thread Nick Zitzmann
On Jul 31, 2013, at 11:35 AM, koko wrote: > I just need some direction here. > > Given a server on a LAN how do I connect to the server, i.e what iOS API do I > use? What kind of server? What protocol does the server use? What are you trying to accomplish? Nick Zitzmann

Connect to Server on LAN over WiFI

2013-07-31 Thread koko
I just need some direction here. Given a server on a LAN how do I connect to the server, i.e what iOS API do I use? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Cont

Re: Search options

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 08:45, dangerwillrobinsondan...@gmail.com wrote: > what are the recommended search facilities for searching for things not > indexed by Spotlight? Or am I limited to task wrappers or NSFileManager > directory enumerations? Clearly that could take a lot of time and resources

Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 06:32, Stephane Sudre wrote: > Is it a known bug that the NSWorkspaceDidTerminateApplicationNotification > notification is not > sent for applications whose LSUIElement key is set to YES? The *behavior* is known, at least by me, and is as you say, Stephane. The question is

Slow down a scroller?

2013-07-31 Thread Steve Mills
Is there any way to make a scroller less touchy? We have a couple cases where the horizontal scroller isn't controlling pixel movements of the view, but is used for more granular movements (rounded to the beginning of each measure in a musical score). It doesn't take much to flick it from 0 to 1

Re: CALayer autoresizing difficulties

2013-07-31 Thread Andreas Mayer
Am 31.07.2013 um 07:39 schrieb livinginlosange...@mac.com: > [_playLayer setAutoresizingMask:kCALayerMinXMargin | kCALayerMaxXMargin | > kCALayerMinYMargin | kCALayerMaxYMargin]; > According to this code, the CALayer should be centered, and as the NSView's > bounds change, the CALayer's frame

Search options

2013-07-31 Thread dangerwillrobinsondanger
I have two questions. The simple one, if a file is invisible to the user but was previously visible (say renamed with a . prefix) can it still be found by NSMetadataQuery searches? The more open ended one, what are the recommended search facilities for searching for things not indexed by Spotli

Re: Exiting non-POSIX threads?

2013-07-31 Thread Fritz Anderson
On 31 Jul 2013, at 9:23 AM, Oleg Krupnov wrote: >> Which is why he specifically mentioned the option of an external watchdog >> process. > > This seems like an overkill. Every app needs some kind of crash > reporting, are you suggesting to accompany each app with a watchdog > process? Besides,

Re: Exiting non-POSIX threads?

2013-07-31 Thread Scott Ribe
On Jul 31, 2013, at 8:23 AM, Oleg Krupnov wrote: > Every app needs some kind of crash > reporting, are you suggesting to accompany each app with a watchdog > process? Yes. (Unless you're distributing through the Mac App Store.) > Besides, the user might think your app is a spyware when he > se

Re: Exiting non-POSIX threads?

2013-07-31 Thread Oleg Krupnov
> Which is why he specifically mentioned the option of an external watchdog > process. This seems like an overkill. Every app needs some kind of crash reporting, are you suggesting to accompany each app with a watchdog process? Besides, the user might think your app is a spyware when he sees the

Re: Exiting non-POSIX threads?

2013-07-31 Thread Scott Ribe
On Jul 30, 2013, at 11:51 PM, Oleg Krupnov wrote: > One downside > of it though is that the user should launch the crashed app at least > one more time. Which is why he specifically mentioned the option of an external watchdog process. -- Scott Ribe scott_r...@elevated-dev.com http://www.elev

[BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Stephane Sudre
Is it a known bug that the NSWorkspaceDidTerminateApplicationNotification notification is not sent for applications whose LSUIElement key is set to YES? I've found an entry for this in StackOverflow but the explanations provided to the original poster are forgetting the LSUIElement factor. Mac OS

Re: Exiting non-POSIX threads?

2013-07-31 Thread Kyle Sluder
On Wed, Jul 31, 2013, at 12:07 AM, Graham Cox wrote: > However, from the point of view of a) the user and b) the director of a > company making and selling apps, it's not what you want to happen. Within the past year or so, we moved all our apps to crashing on uncaught exceptions. This change was

Re: Exiting non-POSIX threads?

2013-07-31 Thread Graham Cox
On 30/07/2013, at 7:43 PM, Quincey Morris wrote: > On Jul 30, 2013, at 10:26 , Graham Cox wrote: > >> How often have you encountered an unexpected exception from some low-level >> code you don't own under circumstances you can't control? If your app >> crashed every time you'd soon have a r