You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
…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 resolvetonyarnold#6.
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 ausing terms from application "Xcode"
block around thetell application "Xcode"
(nowtell 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.The text was updated successfully, but these errors were encountered: