ICeCoffEE 1.3d2 [DO NOT REDISTRIBUTE]
20 January 2003

Open URLs and email addresses in Cocoa applications by ⌘-clicking. Access the Services menu from contextual menus.

Written by Nicholas Riley <mailto:icecoffee@sabi.net>.
Obtain updates from <http://web.sabi.net/nriley/software/>.

What is it?

Perhaps you're a Mac user used to the behavior of ICeTEe in Mac OS 9.

Or maybe you're a new Mac OS X user looking for a faster way to open URLs and email addresses in text documents, Stickies, source code, and more.

Either way, ICeCoffEE is for you!

Installation

Follow the instructions in this installer.  For this development version only, if you've installed an ICeCoffEE 1.0, 1.1 or 1.2 version in /Library/InputManagers, drag it to the Trash before proceeding.

Usage

To test ICeCoffEE:

	1.	Check that TextEdit is not currently open.  ICeCoffEE is only installed in applications you open after installing it.  If you want to be completely sure, log out and log back in.
	2.	Open TextEdit (normally in the Applications folder).
	3.	Type the address (URL) of an Internet location, for example http://www.google.com/.
	4.	Hold down the Command (⌘) key and click anywhere inside the address. Your preferred Web browser will open and display Google’s Web site, assuming your Internet connection is otherwise functioning.

To use ICeCoffEE:

⌘-click anywhere in a Cocoa application's text area.  Some Cocoa applications that come with Mac OS X include Stickies, TextEdit, Mail, and Network Utility.

Control-click (or if you have a multi-button mouse, click with the right button) on a text area, and notice a “Services” menu at the bottom.  This menu works the same way as the Services submenu of the application menu.

Where else does this work?

Some Carbon applications which provided ICeTEe-like behavior under Mac OS 9 continue to do so in Mac OS X.  A few I am aware of are:

BBEdit 	<http://www.barebones.com/products/bbedit.html>
Tex-Edit Plus	<http://www.nearside.com/trans-tex/>

Frequently asked questions

Q. Why not a service?

A. I think services are a good idea.  But in my opinion, Cocoa services are poorly implemented in Mac OS X.  Compare:

Q. Why not a service?

A. I think services are a good idea.  But in my opinion, Cocoa services are poorly implemented in Mac OS X.  Compare:

•	⌘-click with insertion point or selection anywhere in URL

with:

•	carefully select text of URL
•	go to application menu
•	find "Services" item (it isn't in the same place each time)
•	(possibly) find hierarchical menu item for the application you want to launch the URL with
•	select service item

Which one would you rather use? Which one does Apple provide? To improve the situation, unavailable services could be hidden, and the Services menu could be promoted to a top-level menu (as it was in NeXT OSes and Mac OS X Server 1.x) or made available as a contextual menu. ICeCoffEE 1.1 and later support services in contextual menus, and 1.3 and later support services in the menu bar.

Q. But what about assigning keyboard equivalents to services?  Then you'd only have two steps above.

A. There's no set of service keyboard equivalents that is not overlapped by some application or other.  This is especially true when Apple reserves more ⌘ keys than ever for its own use in OS X. It's unlikely that I could pick a key combination that was memorable, easy to press, and yet didn't conflict with any application.

Also, the current implementation of services returns only the selection, not any context surrounding the selection.  This is an essential feature for programs such as ICeCoffEE to work seamlessly.

Finally, the current implementation of services in Mac OS X requires that the Services menu be pulled down in an application before the service keyboard equivalents, making them almost useless.

Q. Do I still need ICeTEe?

A. If you use ICeTEe in Classic, keep it installed.  Unfortunately, no information is shared between Internet Config in Classic and Mac OS X, so you will have to configure your helper information twice.

Q. Why doesn't ICeCoffEE support Java/Carbon/my favorite app?

A. I hope to, in the future.  If you have any suggestions on how to do this, they would be appreciated.

You can also request that your favorite application support ⌘-clicking of URLs directly, as several applications on Mac OS X already do.  Implementing this functionality for an individual application should only be an hour or so of work.  (In comparison, it was over 30 hours of work for me to add URL launching support to the Mac OS X 10.1 version of Terminal, and it was all for nothing because Terminal was rewritten for Mac OS X 10.2.)

Q. What does ICeCoffEE stand for?

A. Internet Config Cocoa Editing Extension.  Or something like that.

Q. My question isn't answered here.

A. That's not a question.  But if you have a question about ICeCoffEE, a suggestion or a bug to report, please email it to me at <icecoffee@sabi.net>.  Please try to keep your messages short and to the point, and I'll get back to you as soon as my schedule will allow.  Thanks!

Version history

1.3d2 / 20 January 2003
•	Added support for contextual menus in Safari’s browser window, and partial ⌘-click launching (select text first)
•	Fixed regression in Project Builder support, no longer reacts on ⌘-click (oops)
•	Use localized text for “Services” title
•	Added Services in the menu bar [Ben Hines]

1.3d1 / 19 January 2003
•	Now an Application Enhancer (APE) module instead of an input manager
•	Uses Unsanity Installer
•	Uses APE Manager for configuration (currently, only excluded applications are included, and ICeCoffEE 1.2 or earlier exclusions are not respected; this will be fixed before 1.3 final)
•	Converted Read Me to RTFD format from plain text
•	Removed Mac OS X 10.1 Terminal support (10.2 Terminal support coming before 1.3 final)
•	Fixed Services in contextual menu for Project Builder 2.0 and Mac OS X 10.2 Terminal

1.2b2 / 20 April 2002
•	Fixed “dead text fields” in tab views [Dr. Suksiri Grams]

1.2b1 / 10 February 2002
•	Be more lenient about the ends of a URL, so >http://... is correctly interpreted
•	Fixed memory leak in Terminal launching

1.2a2 / 10 February 2002
•	Fixed bug when ⌘-clicking in Terminal when text already selected
•	Fixed crashing bug when ⌘-clicking on the last line in Terminal
•	Filter punctuation surrounding URLs (correctly except parentheses, which technically violates RFC 2396 §2.3) [Chris Behm]
•	Support lines which wrap courtesy of Terminal
•	Factored a bunch of code; fixed the URL length checking bug everywhere, not just in one place.

1.2a1 / 8 February 2002
•	Rewrote attributedSubstringFromRange: to only grab complete lines; many hours of pain and suffering for padding lines
•	Fixed off-by-one error in URL length checking

1.2d5 / 7 February 2002
•	Implemented minimal NSTextInput for Terminal.app since it doesn’t do so itself (buggy, crashes when trying to access beyond end of line)
•	Reduced memory consumption in NSTextInput URL launching code

1.2d4 / 30 January 2002
• Fixed crashing bug when ICeCoffEE couldn’t get the selection and tried to call ICStop without ICStart
• Intercept ⌘-click in Terminal.app (but can't do anything with it yet)
• Version of URL launching code that only requires NSTextInput, not NSTextView (uses too much memory)

1.2d3 / 30 January 2002
• Pass mailto hint (⌘-click email addresses)

1.2d2 / 29 January 2002
• Adds contextual menu to Terminal windows

1.2d1 / 28 January 2002
• Proof of feasibility for Terminal.app

1.1 / 28 January 2002 / installer 1.0.2
•	minor tweaks to Read Me file
•	really handle drawers this time
•	fixed crashing bug in installer after remove/install (moral: always use accessors for setting object-valued instance variables)
•	no longer exclude applications which have no CFBundleID
•	properly handle toolbar item views which are nil
•	better error handling during patching

1.1d2 / 27 January 2002 / installer 1.0.1
•	Installer works around suid root bug (should no longer crash NetInfo Manager and Disk Utility on startup) [Peter Miller]
•	Better preference file handling
•	Fixed installer bug where ICeCoffEE couldn’t be removed if the folder in which it was installed was inaccessible
•	No longer disable Services contextual menu in excluded apps
•	Fixed “dead text fields” in toolbars and drawers [ZnU].  Note: to ⌘-click a text field in a toolbar, click then ⌘-click immediately afterwards, otherwise you'll move the toolbar item instead.

1.1d1 / 25 January 2002
Added Services item to contextual menu

1.0 / 25 January 2002
Minor tweaks to Read Me file

1.0a6 / 25 January 2002
Added exclusion, no UI yet (edit the plist if you need to)—defaults to exclude PBX. Added Remove function to the installer

1.0a5 / 24 January 2002
Fixed “dead text fields” bug, I think...

1.0a4 / 23 January 2002
Test version with installer

1.0a3 / 22 January 2002
Only activate on ⌘-left mouse button

1.0a2 / 21 January 2002
Removed debugging messages; reports errors in a dialog box rather than Console; flash URL; fixes errors clicking on <>; temporary disable function; read me

1.0d1 / 20 January 2002
Proof of feasibility.

Acknowledgments

John Marriott, for inspiration and testing
John Hayes, for testing and suggestions
Quinn and Michael Schuerig, for ICeTEe
everyone who worked on Internet Config

This product  uses Application Enhancer system
 Copyright ©2002-2003, Unsanity LLC
http://www.haxies.com/ape/