Thursday, December 14, 2017

#1 2009-10-05 01:31:02 pm

Pandakopanda
Member
Registered: 2009-10-04
Posts: 4

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):

Applescript:


--
-- 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

3. I press cmd-S to save the class.
4. 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:

Synchronization errors:
Interface Builder was not able to parse /Users/jaap/Documents/MyProject/MyProjectAppDelegate.applescript.


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:

Interface Builder could not parse the source file "MyProjectAppDelegate.applescript".

Interface Builder was not able to parse /Users/jaap/Documents/MyProject/MyProjectAppDelegate.applescript.


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 sad

My Xcode version is:

Version 3.2, 64-bit

Component versions
Xcode IDE: 1610.0
Xcode Core: 1608.0
ToolSupport: 1591.0


HELP!  Thanks, Jaap.

Last edited by Pandakopanda (2009-10-05 01:32:38 pm)

Offline

 

#2 2009-10-06 01:51:07 pm

Pandakopanda
Member
Registered: 2009-10-04
Posts: 4

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

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.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)