1

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.

kdougan
  • 333
  • 2
  • 10
  • I don't know. It sounds like you know what you are doing but I suggest that you develop a small app, an SSCCE, that has the problem and post the code to the whole SSCCE: http://sscce.org/ You can send me an email if you would like at: kaydell@yahoo.com. If you do an SSCCE, you can send it to me and I'll be glad to look it over. – Kaydell Aug 22 '13 at 22:18
  • @Kaydell Thats the thing, the first screen shot listed above is the control. It is the default project, freshly created. I added just the line `property theLabel : missing value` and the code for the `doAction_(sender)` method. Once saved, this should be enough for the outlet and action to show in the connections menu of the App Delegate object. This is the way it has always worked. For some reason, it isn't now. – kdougan Aug 22 '13 at 23:21

1 Answers1

0

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.

Kaydell
  • 484
  • 1
  • 4
  • 14
  • Thank you for the suggestions. I went ahead and verified any additional osax files in both my System and User Library folders. Nothing new to report there. Even tried removing them. The issue persists. I also recorded a screen cap of a fresh project showing the issue: [video](http://www.youtube.com/watch?feature=player_detailpage&v=iEECjedBf6w) I don't remember a config change that may have been made. Do you know of a way to reset EVERYTHING back to default for Xcode? I tried using AppZapper to remove the application and all associated files but I don't think that was enough. – kdougan Aug 23 '13 at 23:29
  • "Do you know of a way to reset EVERYTHING back to default for Xcode? " That's a good question. It seem like nowadays that everything having to do with an app is spread out all over the place. There's /Developer You could restart your computer, zip up the /Developer folder into a .zip file and then throw away the original, and then empty the Trash (I should say "make a backup" first). That might explain things because now, Xcode is all in an app bundle where it used to have some stuff in the folder /Developer. – Kaydell Aug 24 '13 at 03:28