Interface Builder not able to parse .applescript - driving me crazy ):

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:

  1. I start Xcode and create a new project using the Cocoa-Applescript Application template.
  2. 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

  1. I press cmd-S to save the class.
  2. 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 :frowning:

My Xcode version is:

HELP! Thanks, Jaap.

I can now confirm it was something in my system. I did a clean Snow Leopard install, immediately followed by an Xcode install and it worked like expected.

I don’t know what it was that causing this problem since the Interface Builder said it couldn’t parse the applescript but didn’t tell why it couldn’t parse the applescript.