Hi,
I want to make a nice dialog for my applescript, I’ve read some of the tutorials here but I’ve hit a wall; either I’m missing something silly or my system is just messed up.
I take the following steps:
- I start Xcode and create a new project using the Cocoa-Applescript Application template.
- In Xcode, I open the MyProjectAppDelegate.applescript class and change the code to the following (adding an outlet and an action, leaving the rest of the code to what it was originally):
--
-- MyProjectAppDelegate.applescript
-- MyProject
--
-- Created by Jaap van Hengstum on 04-10-09.
-- Copyright 2009 __MyCompanyName__. All rights reserved.
--
script MyProjectAppDelegate
property myOutlet : missing value
on myAction_(sender)
end myAction_
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
- I press cmd-S to save the class.
- Then, in Resources, I double click the MainMenu.xib file so the Interface Builder opens.
Then, in the Interface Builder window where the blue cube of my class is in, after a second or so the green light in the status bar turns to yellow and I get the message:
And when I right click the blue cube of My Project App Delegate, I don’t see the outlets or the actions defined in the applescript. I also can’t control-drag to it to receive actions.
When I select Read Class Files… from the menu and select the MyProjectAppDelegate.applescript file manually, I get the following dialog:
From everything I’ve read in this forum, this should just work. I’ve downloaded one of the examples from Craig Williams and his PartOneAppDelegate.applescript is giving me the same errors.
I’ve also uninstalled and reinstalled Xcode and created the project again from a newly created user account to rule out any messed up configuration files - to no avail.
Now I don’t know what to do anymore except for doing a clean Snow Leopard install and I really don’t want to be doing that
My Xcode version is:
HELP! Thanks, Jaap.