Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 13, 2010, 02:24 AM   #1
mrzman
macrumors newbie
 
Join Date: May 2010
applescript and xcode build and run error

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
mrzman is offline   0 Reply With Quote
Old May 13, 2010, 03:54 AM   #2
robbieduncan
Demi-God (Moderator)
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
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.
robbieduncan is offline   0 Reply With Quote
Old May 13, 2010, 07:23 AM   #3
simon.ward
macrumors newbie
 
Join Date: Feb 2010
Can I assume that "on clicked" is your own defined handler?
if so, the syntax needs to be "on clicked(theObject)"
simon.ward is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Applescript with cocoa Renmusxd Mac Programming 0 Nov 16, 2010 11:06 PM
Build and Run Error Komickid iPhone/iPad Programming 1 Dec 12, 2009 02:40 PM
Build and Run occasionally not installing? firewood iPhone/iPad Programming 2 Oct 21, 2008 03:31 PM
java: How do you build and run your project inside xcode instead of terminal? macman2790 Mac Programming 2 Jan 18, 2007 10:51 AM
Can Xcode build and intel-only app? tuartboy Mac Programming 17 Apr 21, 2006 03:04 AM


All times are GMT -5. The time now is 12:10 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC