Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Services do not work with multiple Xcode installs #6

Open
idpaterson opened this issue Aug 16, 2012 · 1 comment
Open

Services do not work with multiple Xcode installs #6

idpaterson opened this issue Aug 16, 2012 · 1 comment
Assignees

Comments

@idpaterson
Copy link

The app name "Xcode" is hard-coded in the services, which does not handle multiple Xcode installs very well. For instance, if I run the service from within a developer preview release named "Xcode45-DP4.app" the service will instead launch my primary Xcode.app install, attempt to query it for the current document, and fail.

I was able to resolve this locally using a combination of set app_name to path to frontmost application as text to get a unique reference to the correct Xcode instance, and a using terms from application "Xcode" block around the tell application "Xcode" (now tell application app_name) commands. There is probably a more robust solution, but I am unfamiliar with AppleScript so I will not be submitting a pull request for this issue based on my fix.

@tonyarnold
Copy link
Owner

That actually seems pretty reasonable to me. I'm no AppleScript expert either, but it's pretty much what I would have done — get a ref to the frontmost app (given the workflow only functions with Xcode) and use it.

Submit a pull request if you can — if there's anything awry, I can fix it up after the merge.

@ghost ghost assigned tonyarnold Aug 16, 2012
idpaterson added a commit to Newstex/Xcode-4-Uncrustify-Automator-Services that referenced this issue Aug 21, 2012
…nstalls. Active document is detected based on the window title since the previous approach was occasionally grabbing a document in a different window within the same process. Should resolve tonyarnold#6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants