I am trying to make my ObjC application scriptable. I included .sdef file into my project, created appropriate classes, very simple, just one command. Anyway, Apple Script Editor can't read my dictionary
I checked evrything twice, tested similar srciptable project from Ray Wenderlich tutorial, the result is the same. Are there any changes in Catalina or sandboxing or anything else?
Thank you.
Related
I have these errors:
Cocoa.h File Not Found (in GPUImageView.h)
Unknown Type Name: **NSOpenGLContext, CVOpenGLESTextureCacheRef (GPUImageContext)
Now, I tried to fix all these errors, but ended up making things worse.
I know OpenGL ES is deprecated in iOS 12, but as I understand deprecation, it should still be working for the moment, right?
For error #1, I don't understand what's a MAC OS framework (cocoa.h) doing in here (some of the references are not surrounded with #IFDEF MAC_OS statements).
As for error #2, these types are defined within the AppKit framework (also a MAC_OS framework, not an iOS framework).
I have considered switching to GPUImage2, but it's a ton of work as it's not as easy as swapping the frameworks, I'll have a lot of code to rewrite. I also see Brad Larson (the semi-God behind this framework) has already started working on GPUImage3 which will use Metal instead of OpenGL ES but it's still work-in-progress but it won't be a simple swap from GPUImage v1 to GPUImage v3.
I found a way to fix it. Maybe it will help someone with the same problem. The GPUImage main folder contains the iOS and the MAC projects.
Go to the framework folder, and delete the GPUImageMac.xcodeproj file.
Then go to the Source folder located within the framework folder, and delete the whole folder named Mac.
Clean your project and rebuild. VoilĂ !
Good luck!
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.
I'm usng OS X version 10.8.4 with Xcode 4.6.2.
I tried out what you said.
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.
I got the actions for the AppDelegate class to work both tying menu-items to First Responder and tying them directly to the AppDelegate.
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.
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.
I am working on a tool similar to the one described in this question, to build and run an Xcode project via AppleScript, in order to automate testing. I am getting the following error message:
Xcode got an error: The specified object is a property, not an element. (-10008)
from the line
set active build configuration type to build configuration type "Debug".
Has something changed in AppleScript and/or Xcode that would break this line? If yes, is there a new way to accomplish the same thing, or at least something similar?
I am using Xcode 4.0.2 on a Mac running OS X 10.6.8.
That's the problem. You see, Apple rebuild Xcode and it's workings, and some AppleScript code (including this one) does not work anymore.
I don't think that there is a solution, unless Apple releases something. I guess they just expect you not to use AppleScript.
I am tryingo to build a GUI application using the JUCE framework on MAC OSX.
I have dowloaded all the API's and got a small hello World program running fine.
However, when I add files to my Xcode project I get compilation errors that say that the Juce library files don`t exist. I would like to know how to get the library API in the build and link path in XCode so that it finds the neccesary files for compilation.
What I would do on Visual Studio going to properties and adding aditional library dependencies, is what I need to do in XCode but I don't know how.
Any help greatly appreciated.
thanks.
Old question but maybe a useful answer in the future....
If you have the "Hello World" up and runnning, it should already be linked to the library. Are you using the introjucer? This should help get everything up and running for you. If you are, you need to add classes etc to the introjucer, as this sets up Xcode / VStudio for you. If not, (Presuming XCode 3 as you are using leopard) goto Xcode > Preferences. Scroll along to source trees, and add the path to the juce folder in there.
I am trying to make help pages for my application. I have written the pages as described in the Apple Help Programming Guide. I've made a folder myapp.help containing the pages, a plist file, indexing etc. and added it to my app bundle. I've also added the CFBundleHelpBookFolder and CFBundleHelpBookName to the app bundle plist.
When I try to register it with AHRegisterHelpBookWithURL() - it fails with error -50 (Error in user parameter list).
I don't want to set up the help bundle with Xcode because I'm already using Makefiles, thanks.
The problem was that the bundle could not be found by MacOS. I had made a link to the executable inside the bundle; the link was in a directory in my path; I typed the name of link into a terminal to run the program - it seemed a fairly neat way to do things.
I didn't realise that CFBundleGetMainBundle() would only work if you started the program from Finder or by entering the path to the executable.