Recent Changes - Search:

WikiDoc

Categories

AlphaX Services

Starting with version 8.2a1d5, AlphaX supports the Services submenu found in the Application menu of many applications on Mac OS X. This support has two aspects:

  • as a client, AlphaX is now able to use the services offered in this menu by other applications
  • AlphaX itself can act as a service provider: it installs a submenu in the Services submenu with a few commands in order to offer some capacities to external applications.

The Mac OS X system provides a complete mechanism to allow applications to extend each otherís functionality. The basic ideas about these application services are exposed in the following document: Application Services Concepts

AlphaX as a service client

The Services menu displays all the services offered by external applications. What is found in this menu depends on which applications are installed on your system. For instance, the Finder proposes a few services such as Open, Reveal, Show Info. The Mail application proposes two services: Send Selection and Send To.

In order to make these services accessible from AlphaX, you must have a document window already opened and some text must be selected in the window. If these conditions are not met, most of the items of the Services menu are dimmed and disabled. This is because they usually expect some text to act upon.

Here are a few examples:

  • if you select the full path of a file or folder in a document window in AlphaX, you can invoke the Finder service Show Info in order to display the usual info window in the Finder.
  • you can select a portion of text in AlphaX and invoke the Mail service Send Selection in order to create a new message in Mail with the text of your selection
  • you can select an URL in an AlphaX document and invoke one of the many services proposing to display an URL (Opera, Camino, OmniWeb offer such services if they are installed on your machine)

AlphaX as a service provider

For an application service to be displayed in the Services menu, the application must be located either in the /Applications folder or in one of the /Library/Services folders in any of the usual domains (System, Network, Local, and User). When a user logs in, Mac OS X searches the /Applications and /Library/Services folders in the four file-system domains. The system examines the information found there in order to populate the items in the Services menu.

So if you want to be able to use AlphaX services from another application, AlphaX has to be installed in the /Applications folder: you must log out and log in again to see the AlphaX services in the Services menu.

As of version 8.2a1d5, AlphaX provides four services available from the submenu called AlphaX in the Services menu:

  • Insert in current doc: this service copies the text selected in the requesting application and pastes it in AlphaX's current document window. If no window is opened in AlphaX, the command does nothing. For instance, you could make a selection in a Safari window and invoke this service to have the selection inserted at the current position in the current window in AlphaX.
  • New document with selection: this service opens a new untitled document window containing the text selected in the requesting application. For instance, you could make a selection in a message displayed in Mail and invoke this service to have the selection pasted in a new window in AlphaX.
  • Open selected file: this service opens in AlphaX the file corresponding to a full path selected in the requesting application. For instance, the path of a file could be selected in another editor like TextEdit: if you invoke this service, AlphaX will attempt to open the file.
  • Evaluate Tcl script: this service lets you evaluate a Tcl script or snippet from another application. AlphaX returns the result of the evaluation of script to the requestor. For instance, you could have a Tcl instruction in a TextEdit window like this: ((| clock format [clock seconds] |)) Invoking this service will evaluate this instruction and replace the selection by the current date and time.

Troubleshooting

As explained above, it is essential that the application be installed in the /Applications folder (or a subfolder thereof). Sometimes, even though the AlphaX services are correctly displayed in the Services menu, invoking them has no effect: this happens when your LaunchServices database is outdated or does not point to the right version of AlphaX. For instance, you could have several versions of AlphaX on your machine and the default one (the one which is automatically launched when you double-click on an AlphaX document) is not the exemplary in the /Applications folder.

The solution is to reset the LauchServices database. How this can be done depends on the version of the system you are using. See detailed instructions here: Resetting Launch Services.

Under Mac OS X 10.4 (Tiger):

  1. Quit all running applications.
  2. Trash the following two files in the /Library/Caches folder: com.apple.LaunchServices-0140.csstore and com.apple.LaunchServices-014nnn.csstore, where nnn is the uid number, as listed in the NetInfo database, of the affected account. Type your Admin password if prompted to authenticate the deletion of these files.
  3. Restart your Mac.
  4. Log in to the affected account.
  5. Empty the Trash.
  6. Verify that the problem is solved. If not, trash the com.apple.LaunchServices.plist file in the ~/Library/Preferences folder of the affected account and repeat steps 1-5.


Add your comments here

Page last modified on July 28, 2007, at 03:51 PM
Hosted on SourceForge.net Logo