Skip navigation.
 
mlRe: SBApplication taking forever to instantiate
FROM : has
DATE : Fri Jan 04 11:56:35 2008

Adam Knight wrote:

> I have the following code:
>
> NSLog(@"Connecting to iPhoto app object");
> iPhotoApplication *iPhoto = [[SBApplication alloc]
> initWithBundleIdentifier:@"com.apple.iPhoto"];
> [iPhoto autorelease];
> NSLog(@"Connected to iPhoto app object");
>
> This works fine if I use the identifier "com.apple.Finder". However, 
> if
> I try to use iPhoto then it takes 15-30 seconds to instantiate, even 
> on
> a fresh install/empty library for iPhoto.  I've tried with the program
> running and not as well, and the object still won't return in any
> acceptable amount of time.


No idea. I see no significant delay here: 1-3 sec including iPhoto 
launch time (this will vary, of course); 0.15 sec if already running. 
FWIW, last time someone ran into response delays with iPhoto, it 
turned out to be a contention issue:

   http://lists.apple.com/archives/Cocoa-dev/2007/Oct/thrd11.html#00983


Oh, and obligatory objc-appscript-is-better-than-Scripting-Bridge-
anyway link:

   http://appscript.sourceforge.net/objc-appscript.html


has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org

Related mailsAuthorDate
mlSBApplication taking forever to instantiate Adam Knight Jan 3, 21:37
mlRe: SBApplication taking forever to instantiate John Stiles Jan 3, 22:29
mlRe: SBApplication taking forever to instantiate has Jan 4, 11:56