LayoutSubviews after orientation change in inactive tab

2013-07-31 Thread Trygve Inda
I have a tabbed iOS app. Tab #2 has a background that is obtained from an auto-resizing scrollView in Tab #1. If I am viewing Tab #2, and rotate the device, I need the layout for Tab #1 to reconfigure its views immediately rather than until I select it again. How can I do this? I have added a

Re: Exiting non-POSIX threads?

2013-07-31 Thread Oleg Krupnov
Hi Ken, Let the app crash. Let the CrashReporter tell the user that it crashed. If you want to receive the crash report yourself, use an external watchdog process or collect the crash report file on next launch. I'd agree that this approach technically is more correct. One downside of it

Re: Mixing Obj-C and C methods

2013-07-31 Thread Andy Lee
On Jul 30, 2013, at 5:29 PM, Michael Crawford li...@warplife.com wrote: That class object occupies a non-zero quantity of memory, at its lowest level being somewhat like the combination of a single copy of a C struct, as well as some C functions, that from the Objective-C point of view, appear

Re: Exiting non-POSIX threads?

2013-07-31 Thread Graham Cox
On 30/07/2013, at 7:43 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Jul 30, 2013, at 10:26 , Graham Cox graham@bigpond.com 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

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

[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

Re: Exiting non-POSIX threads?

2013-07-31 Thread Scott Ribe
On Jul 30, 2013, at 11:51 PM, Oleg Krupnov oleg.krup...@gmail.com 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

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 31, 2013, at 8:23 AM, Oleg Krupnov oleg.krup...@gmail.com 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

Re: Exiting non-POSIX threads?

2013-07-31 Thread Fritz Anderson
On 31 Jul 2013, at 9:23 AM, Oleg Krupnov oleg.krup...@gmail.com 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

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

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

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

Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 06:32, Stephane Sudre dev.iceb...@gmail.com 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,

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

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.

Re: Connect to Server on LAN over WiFI

2013-07-31 Thread Nick Zitzmann
On Jul 31, 2013, at 11:35 AM, koko k...@highrolls.net 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

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 koko
On Jul 31, 2013, at 11:56 AM, Alex Zavatone z...@mac.com 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

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: Initializing a NSMutableString an odd way

2013-07-31 Thread Mike Abdullah
On 31 Jul 2013, at 19:09, Vincent Habchi vi...@macports.org 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]

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com 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]?

Re: Search options

2013-07-31 Thread Jean-Daniel Dupas
Le 31 juil. 2013 à 18:52, Jerry Krinock je...@ieee.org 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

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread David Duncan
On Jul 31, 2013, at 11:25 AM, Vincent Habchi vi...@macports.org wrote: Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com 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

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 enumerations?

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Fritz Anderson
On 31 Jul 2013, at 1:28 PM, David Duncan david.dun...@apple.com wrote: On Jul 31, 2013, at 11:25 AM, Vincent Habchi vi...@macports.org wrote: Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit : I apologize if this question looks stupid or contrived. Here it is: is it

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 david.dun...@apple.com wrote: On Jul 31, 2013, at 11:25 AM, Vincent Habchi vi...@macports.org wrote: Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit : I apologize if this

Re: Search options

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 11:29, Ken Thomases k...@codeweavers.com 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.

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

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 vi...@macports.org wrote: Thanks to all for answering, Why would there be? Your just asking for a mutable

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 je...@ieee.org wrote: On 2013 Jul 31,

Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Peter Ammon
On Jul 31, 2013, at 9:28 AM, Jerry Krinock je...@ieee.org wrote: On 2013 Jul 31, at 06:32, Stephane Sudre dev.iceb...@gmail.com wrote: Is it a known bug that the NSWorkspaceDidTerminateApplicationNotification notification is not sent for applications whose LSUIElement key is set to YES?

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Fritz Anderson
On 31 Jul 2013, at 2:28 PM, Vincent Habchi vi...@macports.org 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

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Greg Parker
On Jul 31, 2013, at 12:28 PM, Vincent Habchi vi...@macports.org 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

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Gary L. Wade
On 7/31/2013 1:01 PM, Greg Parker gpar...@apple.com 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

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 Greg Parker
On Jul 31, 2013, at 1:32 PM, Vincent Habchi vi...@macports.org 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

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 vi...@macports.org 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

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Le 31 juil. 2013 à 22:38, Greg Parker gpar...@apple.com 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

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 vi...@macports.org 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:@« »]

Re: [BUG?] LSUIElement=YES and NSWorkspaceDidTerminateApplicationNotification

2013-07-31 Thread Jerry Krinock
On 2013 Jul 31, at 12:46, Stephane Sudre dev.iceb...@gmail.com 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