
/*
	Convert a string into an attributed string that looks like a hyperlink -- blue and underlined.
	Original Source: <http://cocoa.karelia.com/Foundation_Categories/NSString/Convert_a_string_in.m>
	(See copyright notice at <http://cocoa.karelia.com>)
*/

- (NSAttributedString *)hyperlink
{
	NSDictionary *attributes
		= [NSDictionary dictionaryWithObjectsAndKeys:
		[NSNumber numberWithInt:NSSingleUnderlineStyle], NSUnderlineStyleAttributeName,
		self,NSLinkAttributeName,	// link to self
		[NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName,
		[NSColor colorWithCalibratedRed:0.1 green:0.1 blue:1.0 alpha:1.0],
			NSForegroundColorAttributeName,
		nil];
	NSAttributedString *result
		= [[[NSAttributedString alloc]
			initWithString:self
			attributes:attributes] autorelease];
	return result;
}