Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrzman

macrumors newbie
Original poster
May 12, 2010
1
0
Hi all,
I am quite new to xcode and apple script and I need help with my first project, I have been following the “hello world” tutorial and I haven’t got it to work so far. I am using xcode 3.2.
Here is my script:

script UntitledAppDelegate

on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_

on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return my NSTerminateNow
end applicationShouldTerminate_

end script
on clicked theObject
display dialog "hello world"
end clicked

Each time I try to build and run it fails with this
Command /usr/bin/osacompile failed with exit code 1

Any ideas
Thanks
:):apple:
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
This is the downside to using AppleScript to write your app: you don't get told where the error is and just have to guess.
 

simon.ward

macrumors newbie
Feb 11, 2010
5
0
Can I assume that "on clicked" is your own defined handler?
if so, the syntax needs to be "on clicked(theObject)"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.