Re: NSTask terminates when NSApplication exits (Scott Ribe)
Re: NSTask terminates when NSApplication exits (Scott Ribe) Ling Peng 在 2012年1月19日,4:02,cocoa-dev-requ...@lists.apple.com 写道: > Re: NSTask terminates when NSApplication exits (Scott Ribe) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 28
My Java processes do not quit if I pipe their output to null: �NSTask *task = [NSTask new]; �[task setLaunchPath:execPath]; �[task setCurrentDirectoryPath:_directory]; �[task setArguments:arguments]; �[task setStandardError:[NSFileHandle fileHandleWithNullDevice]]; �[task setStandardOutput:[NSFileHandle fileHandleWithNullDevice]]; �[task launch]; Ling Peng 在 2012年1月19日,18:40,cocoa-dev-requ...@lists.apple.com 写道: > My Java > processes do not quit if I pipe their output to null: > �NSTask *task = [NSTask new]; > �[task setLaunchPath:execPath]; > �[task setCurrentDirectoryPath:_directory]; > �[task setArguments:arguments]; > �[task setStandardError:[NSFileHandle fileHandleWithNullDevice]]; > �[task setStandardOutput:[NSFileHandle fileHandleWithNullDevice]]; > �[task launch]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 28
Re: logged: auto malloc[27012]: attempted to remove unregistered weak referrer 0xblahblah multiple times. What is most interesting is that it only happens when selecting multiple items by dragging. I first noticed it in this code: - (IBAction) showOpenPanel: (id) sender { BOOL reloadNeeded = NO; BOOL showWarning = NO; NSOpenPanel *panel = [NSOpenPanel openPanel]; CFArrayRef types = CGImageSourceCopyTypeIdentifiers(); CFMakeCollectable(types); [panel setAllowedFileTypes: (NSArray*) types]; [panel setAllowsMultipleSelection: YES]; [panel setCanChooseFiles: YES]; [panel setCanChooseDirectories: NO]; NSInteger result = [panel runModal]; if (result == NSOKButton) { // this may take a while, let the user know we're busy [self showProgressIndicator]; NSArray *urls = [panel URLs]; for (NSURL *url in urls) { NSString *path = [url path]; if (! [self isDuplicatePath: path]) { [imageInfos addObject: [ImageInfo imageInfoWithPath: path]]; reloadNeeded = YES; } else showWarning = YES; } [self hideProgressIndicator]; if (reloadNeeded) [tableView reloadData]; if (showWarning) { NSAlert *alert = [[NSAlert alloc] init]; [alert addButtonWithTitle: NSLocalizedString(@"CLOSE", @"Close")]; [alert setMessageText: NSLocalizedString(@"WARN_TITLE", @"Files not opened")]; [alert setInformativeText: NSLocalizedString(@"WARN_DESC", @"Files not opened")]; [alert runModal]; } } } In the open panel I can click, move the mouse, then shift-click and all is OK. Ling Peng 在 2012年1月19日,18:40,cocoa-dev-requ...@lists.apple.com 写道: > logged: auto malloc[27012]: attempted to remove unregistered weak referrer > 0xblahblah > multiple times. What is most interesting is that it only happens when > selecting multiple items by dragging. I first noticed it in this code: > > - (IBAction) showOpenPanel: (id) sender > { >BOOL reloadNeeded = NO; >BOOL showWarning = NO; > >NSOpenPanel *panel = [NSOpenPanel openPanel]; >CFArrayRef types = CGImageSourceCopyTypeIdentifiers(); >CFMakeCollectable(types); >[panel setAllowedFileTypes: (NSArray*) types]; >[panel setAllowsMultipleSelection: YES]; >[panel setCanChooseFiles: YES]; >[panel setCanChooseDirectories: NO]; >NSInteger result = [panel runModal]; >if (result == NSOKButton) { >// this may take a while, let the user know we're busy >[self showProgressIndicator]; >NSArray *urls = [panel URLs]; >for (NSURL *url in urls) { >NSString *path = [url path]; >if (! [self isDuplicatePath: path]) { >[imageInfos addObject: [ImageInfo imageInfoWithPath: path]]; >reloadNeeded = YES; >} else >showWarning = YES; >} >[self hideProgressIndicator]; > >if (reloadNeeded) >[tableView reloadData]; >if (showWarning) { >NSAlert *alert = [[NSAlert alloc] init]; >[alert addButtonWithTitle: NSLocalizedString(@"CLOSE", @"Close")]; >[alert setMessageText: NSLocalizedString(@"WARN_TITLE", @"Files not > opened")]; >[alert setInformativeText: NSLocalizedString(@"WARN_DESC", @"Files not > opened")]; >[alert runModal]; >} >} > } > > In the open panel I can click, move the mouse, then shift-click and all is OK. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 28
Re: The desired output is something like: NSString *template = @"HH:mm:ss EEE dd. MMM zzz"; NSString *dateFormat = [ NSDateFormatter dateFormatFromTemplate: template options: 0 locale: nil ]; NSDateFormatter *dateFormatter = [ [ NSDateFormatter alloc ] init ]; [ dateFormatter setDateFormat: dateFormat ]; NSString *dateString = [ dateFormatter stringFromDate: someDate ]; [ dateFormatter release ]; Ling Peng 在 2012年1月19日,18:40,cocoa-dev-requ...@lists.apple.com 写道: > Send Cocoa-dev mailing list submissions to >cocoa-dev@lists.apple.com > > To subscribe or unsubscribe via the World Wide Web, visit >http://lists.apple.com/mailman/listinfo/cocoa-dev > or, via email, send a message with subject or body 'help' to >cocoa-dev-requ...@lists.apple.com > > You can reach the person managing the list at >cocoa-dev-ow...@lists.apple.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Cocoa-dev digest..." > > > Today's Topics: > > 1. Re: NSTask terminates when NSApplication exits (Keary Suska) > 2. Re: NSTask terminates when NSApplication exits (Ken Thomases) > 3. Re: NSTask terminates when NSApplication exits (Andrew) > 4. Re: NSTask terminates when NSApplication exits (Scott Ribe) > 5. Re: Is slowing down bindings updates possible? (Marcel Weiher) > 6. Re: Is slowing down bindings updates possible? (Ken Thomases) > 7. Re: Is slowing down bindings updates possible? (Kyle Sluder) > 8. auto malloc[27012]: attempted to remove unregistered weak > referrer (Marco S Hyman) > 9. controlling a camcorder (Eric Smith) > 10. Printing an NSDate (Gerriet M. Denkmann) > 11. Get OS version of iOS device connected to Mac OS X > (Payal Mundhada) > 12. Re: Printing an NSDate (Andreas Grosam) > > > -- > > Message: 1 > Date: Wed, 18 Jan 2012 14:13:01 -0700 > From: Keary Suska > Subject: Re: NSTask terminates when NSApplication exits > To: Andrew > Cc: "Cocoa-Dev \(Apple\)" > Message-ID: > Content-Type: text/plain; charset=windows-1252 > > On Jan 18, 2012, at 11:59 AM, Andrew wrote: > >> I am trying to write a program that maintains different installs of >> another program including launching the program. To do so, I am using >> NSTask. Now when I quit my cocoa app. the NSTask app dies. The task >> that the NSTask is running is a Java program, not sure if that makes a >> difference. According to what I have read, the application should keep >> running even when the parent task exits. I am running my cocoa app >> from in XCode4, not sure if that has any effect on it. Could it be >> that I am not specifying standard* streams so when the parent app >> quits, those streams are closed and thus the process? >> >> I can probably find out the answer by trying different things, but I'd >> like to get a better insight for what is going on and why the child >> task is terminating. > > Any special handling of NSTask aside, Mac OS X uses Unix-based process > control which closes all child processes when the parent is closed. Since > your sub-program is Java you may be able to detach the child process. This is > usually accomplished by the sub-program by executing a low-level fork(). It > may need to be followed by an exec() to fully detach the process. Note that > you can't do this with Cocoa/Objective-C (at least Apple says you shouldn't�) > > Alternatively (and probably preferably) you could use launchd/Launch Services > as recommended. Useful reading: > http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html > > HTH, > > Keary Suska > Esoteritech, Inc. > "Demystifying technology for your home or business" > > > > -- > > Message: 2 > Date: Wed, 18 Jan 2012 15:27:57 -0600 > From: Ken Thomases > Subject: Re: NSTask terminates when NSApplication exits > To: Keary Suska > Cc: "Cocoa-Dev \(Apple\)" > Message-ID: > Content-Type: text/plain; charset=windows-1252 > > On Jan 18, 2012, at 3:13 PM, Keary Suska wrote: > >> Any special handling of NSTask aside, Mac OS X uses Unix-based process >> control which closes all child processes when the parent is closed. > > No, that's not true. Where did you get that? > > Processes with a controlling terminal get a SIGHUP when that terminal is > closed, and that will kill a naive process, but that wouldn't apply to > subprocesses of GUI apps. Other than that, child processes are independent > of their parent process. > >> Since your sub-program is Java you may be able to detach the child process. > > This doesn't make sense to me. What does being Java have to do with anything? > >> This is usually accomplished by the sub-program by executing a low-level >> fork(). It may need to be followed by an exec() to fully detach the process. > > Fork() creates the child subprocess as a near duplicate of the parent. > Exec() r
Re: Cocoa-dev Digest, Vol 9, Issue 33
Re: [NSTextView]: Scroll top when bound-to string changes (Kyle Sluder) Jim Lin 在 2012-1-21,5:13,cocoa-dev-requ...@lists.apple.com 写道: > NSTextView : Scroll top when bound-to string changes > (Kyle Sluder) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 33
Re: NSTextView : Scroll top when bound-to string changes Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Jim Lin 在 2012-1-21,5:13,cocoa-dev-requ...@lists.apple.com 写道: > Re: NSTextView : Scroll top when bound-to string changes > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 34
Subject: Re: auto malloc[27012]: attempted to remove unregistered weak referrer Message-ID: <5c732f8d-655e-44bb-abf2-ed258af99...@snafu.org> Content-Type: text/plain; charset=us-ascii Jim Lin 在 2012-1-21,13:18,cocoa-dev-requ...@lists.apple.com 写道: > Subject: Re: auto malloc[27012]: attempted to remove unregistered weak >referrer > Message-ID: <5c732f8d-655e-44bb-abf2-ed258af99...@snafu.org> > Content-Type: text/plain; charset=us-ascii ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 32
Re: NSTextView : Scroll top when bound-to string changes (Jerry Krinock) Jim Lin 在 2012-1-21,4:00,cocoa-dev-requ...@lists.apple.com 写道: > Re: NSTextView : Scroll top when bound-to string changes > (Jerry Krinock) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 36
Re: Cocoa-dev Digest, Vol 9, Issue 33 (lpeng...@gmail.com) 8. Re: Cocoa-dev Digest, Vol 9, Issue 33 (lpeng...@gmail.com) 9. Re: Cocoa-dev Digest, Vol 9, Issue 34 (lpeng...@gmail.com) 10. Re: Cocoa-dev Digest, Vol 9, Issue 32 (lpeng...@gmail.com) Jim Lin 在 2012-1-22,2:31,cocoa-dev-requ...@lists.apple.com 写道: > Re: Cocoa-dev Digest, Vol 9, Issue 33 (lpeng...@gmail.com) > 8. Re: Cocoa-dev Digest, Vol 9, Issue 33 (lpeng...@gmail.com) > 9. Re: Cocoa-dev Digest, Vol 9, Issue 34 (lpeng...@gmail.com) > 10. Re: Cocoa-dev Digest, Vol 9, Issue 32 (lpeng...@gmail.com) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 37
Re: auto malloc[27012]: attempted to remove unregistered weak referrer (Sean McBride) 2. Re: Strange renaming of Documents folder (Ken Thomases) 3. Re: Strange renaming of Documents folder (John Joyce) 4. Re: NSSlider and arrangedObjects (Quincey Morris) 5. Re: Strange renaming of Documents folder (Ken Thomases) Jim Lin 在 2012-1-22,10:41,cocoa-dev-requ...@lists.apple.com 写道: > Re: auto malloc[27012]: attempted to remove unregistered weak > referrer (Sean McBride) > 2. Re: Strange renaming of Documents folder (Ken Thomases) > 3. Re: Strange renaming of Documents folder (John Joyce) > 4. Re: NSSlider and arrangedObjects (Quincey Morris) > 5. Re: Strange renaming of Documents folder (Ken Thomases) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 38
Re: Cocoa-dev Digest, Vol 9, Issue 36 (lpeng...@gmail.com) 2. NSXMLParser, streams, multiple threads, and crashing (Thomas Davie) 3. Re: Strange renaming of Documents folder (Martin Hewitson) 4. Re: NSXMLParser, streams, multiple threads, and crashing (Andreas Grosam) 5. Re: NSXMLParser, streams, multiple threads, and crashing (Thomas Davie) 6. Re: Cocoa-dev Digest, Vol 9, Issue 37 (lpeng...@gmail.com) 7. Re: Versions, -windowWillClose: (Martin Hewitson) 8. Re: Strange renaming of Documents folder (Martin Hewitson) 9. Re: When in Versions browser (Martin Hewitson) 10. Re: Versions, -windowWillClose: (Dave Fernandes) Jim Lin 在 2012-1-22,23:57,cocoa-dev-requ...@lists.apple.com 写道: > Re: Cocoa-dev Digest, Vol 9, Issue 36 (lpeng...@gmail.com) > 2. NSXMLParser, streams, multiple threads, and crashing > (Thomas Davie) > 3. Re: Strange renaming of Documents folder (Martin Hewitson) > 4. Re: NSXMLParser, streams, multiple threads, and crashing > (Andreas Grosam) > 5. Re: NSXMLParser, streams, multiple threads, and crashing > (Thomas Davie) > 6. Re: Cocoa-dev Digest, Vol 9, Issue 37 (lpeng...@gmail.com) > 7. Re: Versions, -windowWillClose: (Martin Hewitson) > 8. Re: Strange renaming of Documents folder (Martin Hewitson) > 9. Re: When in Versions browser (Martin Hewitson) > 10. Re: Versions, -windowWillClose: (Dave Fernandes) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 39
Re: Versions, -windowWillClose: (Martin Hewitson) 2. Re: NSSlider and arrangedObjects (Ken Thomases) 3. Re: NSXMLParser, streams, multiple threads, and crashing (Jens Alfke) 4. Re: NSXMLParser, streams, multiple threads, and crashing (Thomas Davie) 5. Re: NSTextView : Scroll top when bound-to string changes (Ken Thomases) 6. Re: While running our iPhone app,the screen sometimes goes white and locks up. Any idea why? (Greg Parker) 7. NSOpenPanel problem (Jan E. Schotsman) 8. Re: NSOpenPanel problem (Ken Thomases) 9. Re: Cocoa-dev Digest, Vol 9, Issue 38 (lpeng...@gmail.com) 10. Re: While running our iPhone app,the screen sometimes goes white and locks up. Any idea why? (G S) 11. Changing Album Name property of the audio book track,does Jim Lin 在 2012-1-23,17:18,cocoa-dev-requ...@lists.apple.com 写道: > Re: Versions, -windowWillClose: (Martin Hewitson) > 2. Re: NSSlider and arrangedObjects (Ken Thomases) > 3. Re: NSXMLParser, streams, multiple threads, and crashing > (Jens Alfke) > 4. Re: NSXMLParser, streams, multiple threads, and crashing > (Thomas Davie) > 5. Re: NSTextView : Scroll top when bound-to string changes > (Ken Thomases) > 6. Re: While running our iPhone app,the screen sometimes goes > white and locks up. Any idea why? (Greg Parker) > 7. NSOpenPanel problem (Jan E. Schotsman) > 8. Re: NSOpenPanel problem (Ken Thomases) > 9. Re: Cocoa-dev Digest, Vol 9, Issue 38 (lpeng...@gmail.com) > 10. Re: While running our iPhone app,the screen sometimes goes > white and locks up. Any idea why? (G S) > 11. Changing Album Name property of the audio book track,does ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 9, Issue 28
Re: Get OS version of iOS device connected to Mac OS X (Payal Mundhada) On 2012年1月19日, at 18:40, cocoa-dev-requ...@lists.apple.com wrote: > Get OS version of iOS device connected to Mac OS X > (Payal Mundhada) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com