PackageDescription: ExternalWebBrowser-TextEditor


External Web Browser - Text Editor

Last published: June 8, 2007 by 'bobw'

Defines 3 Classes
Extends 5 Classes


The package, ExternalWebBrowser-Text, extends the system so that the you can have text that has hyperlink empahsis. It also extends the system's existing ParagraphEditors (and subclasses) so that if you click on this text, the web browser will open (this behavior is provided by the package ExternalWebBrowser). This works great if you have somewhat static text editors. However, if you have continuousAccept set to be true for a TextEditor, then the emphasis is not updated as you type.

This package provides a new view, ExternalBrowserEnabledTextEditorView, which is a subclass of TextEditorView, which can handle the case when continuousAccept is set to true. It will also add this new widget to the pallete of the UIPainter, which is probably overkill because it doesn't really provide any (real) new behavior over the existing TextEditorView. New subclasses are used rather than imposing this behavior on the system with overrides.

The implementation is pretty crude and can probably be improved. You might not even find this package all that useful. However, it seems to work well enough for me.

Here is a do-it that you can will have its emphasis update when you type:

UIBuilder webBrowserEnabledExampleTwo: 'http://www.cincomsmalltalk.com and http://www.stic.st/'

--
Bob Westergaard
http://www.cincomsmalltalk.com/userblogs/bobw/blogView