AppleScriptObjc - Xcode 4.6.3 - Xcode No Longer Recognizes Created Outlets or Actions

417 views Asked by At

Okay, log time reader, first time writer.

!!! NOTE: While reading this question, please bear in mind I am writing using AppleScript in a fresh Cocoa-Applescript project. I am NOT using straight Cocoa/Objective-C. !!!

With that out of the way.

I have been using Xcode and ASObjC for a while now and have developed quite a few productivity apps for myself, so I have a pretty good idea as to what I am doing and how it is supposed to work. However, this issue has me pulling my hair out!

A few weeks ago, I updated to OSX 10.8.4 (this is when I believe the issue started). Since then, Xcode no longer recognizes any outlets or actions I define in my AppDelegate file.


Here is an image illustrating the issue:

http://cl.ly/image/0a1b1T1O1O1m

"theLabel" should show under Referencing Outlets and "doAction" should show under Received Actions


This is especially strange when viewing projects created before the issue:

http://cl.ly/image/3J0m2a2q392r

The "!" to the right of each outlet states: AppDelegate does not have an Outlet named [outlet name] The Actions have a similar warning message.


I have done some Troubleshooting on the issue with no success.

  • Restarted Xcode - issue persists
  • created fresh project - issue persists
  • pulled all .plist files related to Xcode - issue persists
  • trashed DerivedData folder - issue persists
  • removed and reinstalled from App Store - issue persists
  • created fresh user account and project - issue persists
  • reset NVRAM - issue persists
  • tried on different computer - issue resolved

Issue seems to be isolated to this machine.

If anyone can help me with this, that would be awesome. Maybe I am just missing something important.

1

There are 1 answers

2
Kaydell On

I'm usng OS X version 10.8.4 with Xcode 4.6.2.

I tried out what you said.

  1. I made a new AppleScriptObjC project from the Xcode template with document-based application set to false, so Xcode create a new project for me with an AppDelegate.

  2. I got the actions for the AppDelegate class to work both tying menu-items to First Responder and tying them directly to the AppDelegate.

  3. I tried changing the name of the app delegate to "ThisIsTheDelegate". This didn't work until I also changed the name of the AppDelegate class to be "ThisIsTheDelegate" in Xcode's identify inspector.

Setting the name of the AppDelegate class

I don't know if this is the problem that you are having or not.

You wrote in your original question that:

  • tried on different computer - issue resolved

So it must be something about your configuration.

When I first tried AppleScriptObjC in Xcode, I got some errors that were resolved on my computer by removing some osax files from

/Library/ScriptingAdditions

I don't know if this is the problem that you are having, but I removed them all and stashed them somewhere else for safe-keeping in case I needed them, and I haven't needed them yet.

I believe that these .osax scripting additions were installed by a third-party, namely Smile and Satimage.

I understand that there is some good functionality in these scripting additions, but Apple recommends that third-party developers don't even develop .osax scripting additions because they as so global.

What's better is to use Scripting Agents which are apps that aren't even in the picture unless you give them a tell command.

That's all that I can think of.