(Prev Next) Part of UserLand's MIDAS Website. Wednesday, August 27, 1997.

System-wide Hotlink Proposal

What should happen when you cmd-2click on some text in any Macintosh application.

I first used this feature in Think C. Cmd-2click on a name. The IDE opens the file that contains the definition of thing you cmd-2clicked on. I came to depend on it. It allowed me to store things in the file they belonged in, without worrying if they'd be nearby if I was working on a particular piece of code. Now that we're working in different apps, not just different files, the need is even greater.

We implemented this in Frontier. Cmd-2click on the name of an object, and Frontier opens the object. I miss this feature very much when I use BBEdit to edit my web pages.

It raises the question -- why don't we have a system-wide way of cmd-2clicking?

Here's how it would work, first the current app gets a shot at the name. If it's not defined, then it loops over all the running apps, sending an AE to each app containing the string. If it's defined, it returns true, otherwise false. The current app stops looking on a true return. Then it brings the app that caught it to the front.

It would be easy to implement this in a toolkit. Support would be in two parts:

1. Hook into the mouse handler. Call a toolkit routine. If it returns true, go back to your main event loop.

2. Add an Apple Event handler that does whatever makes sense in your app to process one of these strings.

Once we have this, we'll need to take a look at how each app implements 2clicking on text to select. Frontier looks to the left and stops at the first blank it finds, same with the right scan. Other apps stop at periods, which creates problems for environments that use dotted ids, which includes Frontier and now Java and Javascript (VB Script?).

Who would be willing to support this?

Rich Siegel, siegel@barebones.com, says yes.


This page was last built with Frontier on a Macintosh on Wednesday, August 27, 1997 at 7:41:24 PM. Thanks for checking it out! Dave