summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2019-05-20 13:21:19 (GMT)
committerculler <culler>2019-05-20 13:21:19 (GMT)
commit9f717aa5b56d4754f664cb0b8698e66c0a51a544 (patch)
tree21444371502dda96c1e3ca04173abbfd06dd05dd /macosx
parentcc1acfaabd6c9e88963ea23d07c5654ad9532818 (diff)
downloadtk-9f717aa5b56d4754f664cb0b8698e66c0a51a544.zip
tk-9f717aa5b56d4754f664cb0b8698e66c0a51a544.tar.gz
tk-9f717aa5b56d4754f664cb0b8698e66c0a51a544.tar.bz2
Edited README.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/README55
1 files changed, 37 insertions, 18 deletions
diff --git a/macosx/README b/macosx/README
index 04073dd..ee87626 100644
--- a/macosx/README
+++ b/macosx/README
@@ -676,31 +676,50 @@ it triggered when the system appearance toggles between dark and light.
7.0 Mac Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-With 8.6.10, Tk supports the Mac's NSServices API, documented at https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/SysServices/introduction.html#//apple_ref/doc/uid/10000101-SW1 and in TIP 536 and Tk's man page. Tk presents a simple, straightforward API to implement the Services functionality, but testing and deploying can be a bit tricky. Apple's documents suggest running /System/Library/CoreServices/pbs -dump_pboard to check to see if your application's services have been recognized by the OS, but it may also be necessary to work with Apple's "lsregister" tool to ensure that the correct version of Wish has been picked up by the OS:
-
-First, run this command:
+With 8.6.10, Tk supports the Mac's NSServices API, documented at
+https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/SysServices/introduction.html#//apple_ref/doc/uid/10000101-SW1
+and in TIP 536 and Tk's man page. Tk presents a simple,
+straightforward API to implement the Services functionality.
+
+The Tk implementation of the NSServices API is intended for standalone
+applications, such as one wrapped by the standalone version of Wish
+and re-named into a different application. In particular such an
+application would specify its own unique CFBundleIdentifier in its
+Info.plist file. During development, however, if Wish itself is being
+used as the receiver, it may be necessary to take some care to ensure
+that the correct version of Wish.app is available as a receiver of
+NSServices data.
+
+When one macOS app uses NSServices to send data to another app that is
+not running, LaunchServices will launch the receiver. LaunchServices
+assumes that the CFBundleIdentifier uniquely identifies an app among
+all of the apps installed on a system. But this may not be the case
+for Wish.app if, for example, you have compiled Tk from source at some
+time in the past. In that case the Tk build directory will contain
+its own copy of Wish.app that will be visible to LaunchServices. It
+may be necessary when testing your app to take some steps to ensure
+that LaunchServices is launching the correct Wish.app. Instructions
+for doing this are provided below.
+
+The command line tool which manages the LaunchServices database has
+an amazingly unwieldy path name. So, first, run this command:
alias lsregister='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister'
-Then, you can reset the launch services database used by the launch service like this:
-$ lsregister -kill
-$ lsregister -seed
-
-Then you can run this command to find out what will happen if you ask the launch service to launch Wish.app:
-lsregister -dump | grep path | grep Wish
+Then you can reset the LaunchServices database like this:
-If the wrong version of Wish is showing up in this list, you can unregister that version as follows:
-
-alias lsregister='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister'
-
-You can reset the database used by the launch service like this:
$ lsregister -kill
$ lsregister -seed
-Then you can run this command to find out what will happen if you ask the launch service to launch Wish.app:
+To find out which versions of Wish.app have been located by
+LaunchServices, run:
+
+$ lsregister -dump | grep path | grep Wish
-lsregister -u /path/to/Wish
+If more than one version of Wish is showing up in this list, eliminate
+all of the unintended targets by running
-Continue this until the correct version of Wish shows up in your path.
+lsregister -u /path/to/bad/Wish.app
-This advice is focused mainly on testing the services you are developing for your application. From an end-user standpoint, the NSServices API is intended for standalone applications, such as one wrapped by the standalone version of Wish and re-named into a different application, so the complexities discussed above are not likely to be encountered by end users. \ No newline at end of file
+Continue this until only the correct version of Wish shows up in the
+list.