Sorry for my short messages, I was trying to keep it simple & clean.


Garbage collection is off.
GCC_ENABLE_OBJC_GC = unsupported


Here is my code:

"User clicks a button..."

- (IBAction)testAppleScript: (id)sender
{
        [self callAppleScript];
}

- (void)callAppleScript
{
        NSDictionary* errorDict;
        NSAppleEventDescriptor* returnDescriptor = NULL;
NSAppleScript* scriptObject = [[NSAppleScript alloc] initWithSource:@"beep"];
        
>>>>returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
        [scriptObject release];
        
        if( returnDescriptor != NULL )
        {
                // successful execution
                if( kAENullEvent != [returnDescriptor descriptorType] )
                {
                        // script returned an AppleScript result
                        if( cAEList == [returnDescriptor descriptorType] )
                        {
                                // result is a list of other descriptors
                        }
                        else
                        {
                                // coerce the result to the appropriate ObjC 
type
                        }
                }
        }
        else
        {
                // no script result, handle error here
        }
}


The console output:

2008-04-28 19:16:46.910 MyApp[945:10b] Error loading /Library/ ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/ Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find: /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/ Adobe Unit Types: no matching architecture in universal wrapper MyApp: OpenScripting.framework - scripting addition /Library/ ScriptingAdditions/Adobe Unit Types.osax declares no loadable handlers. 2008-04-28 19:16:46.911 MyApp[945:10b] Error loading /Library/ ScriptingAdditions/FITS.osax/Contents/MacOS/FITS: dlopen(/Library/ ScriptingAdditions/FITS.osax/Contents/MacOS/FITS, 262): no suitable image found. Did find: /Library/ScriptingAdditions/FITS.osax/Contents/MacOS/FITS: no matching architecture in universal wrapper MyApp: OpenScripting.framework - scripting addition /Library/ ScriptingAdditions/FITS.osax declares no loadable handlers.
2008-04-28 19:16:46.914 MyApp[945:10b] LCC Scroll Enhancer loaded

[Session started at 2008-04-28 19:16:46 +0200.]
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Moe/Xcode Projects/Cocoa/MyApp/build/Debug/ MyApp.app/Contents/MacOS/MyApp', process 945.
(gdb)


The beach ball cursor starts spinning forever.


The debugger:

#0      0x7fff80e73d55 in _objc_fixupMessageRef
#1      0x7fff80e75cdf in objc_msgSend_fixup
#2      0x1071ec814 in SATerminate
#3      0x1071e7af6 in SAInitialize
#4      0x7fff815f543d in IterateFolder
#5      0x7fff815f57f1 in HandleGDUT
#6      0x7fff845c7f5b in _fixupAppleEventHandler
#7      0x7fff845c3717 in aeDispatchAppleEvent
#8      0x7fff845b4d5b in AESendMessage
#9      0x7fff845b7079 in aeSend
#10     0x7fff808c5abf in AESend
#11     0x11d8d439c in AEDefaultSendProc
#12     0x11d8d7e3b in ComponentSend
#13     0x11d8d8006 in SendSimpleEventWithReply
#14     0x11d8c39bb in ASInitLocal
#15     0x11d8c3a86 in ASDefaultInit
#16     0x11d8bbc89 in AppleScriptComponent
#17     0x7fff815f41ad in OSASetActiveProc
#18     0x11d8d3964 in AGenericManager::UpdateInstanceProcs
#19     0x11d8d3a70 in AGenericManager::ComponentFromSubtype
#20     0x11d8d340e in AGenericCall::PreDelegate
#21     0x11d8d3b75 in AGenericManager::HandleOSACall
#22     0x7fff81603c4b in OSACompile
#23     0x7fff80258755 in -[NSAppleScript compileAndReturnError:]
#24 0x7fff802589c5 in -[NSAppleScript(NSPrivate) _executeWithMode:andReturnError:] #25 0x100002996 in -[AppController callAppleScript] at AppController.m: 285 #26 0x10000253b in -[AppController testAppleScript:] at AppController.m:97
#27     0x7fff83baa0bb in -[NSApplication sendAction:to:from:]
#28     0x7fff83ba9ff3 in -[NSControl sendAction:to:]
#29     0x7fff83ba9524 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
#30 0x7fff83ba8d4e in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:]
#31     0x7fff83ba85a7 in -[NSControl mouseDown:]
#32     0x7fff83ba6aff in -[NSWindow sendEvent:]
#33     0x7fff83b7425b in -[NSApplication sendEvent:]
#34     0x7fff83aceb7b in -[NSApplication run]
#35     0x7fff83a9b8f3 in NSApplicationMain
#36     0x100001735 in main at main.m:12

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to