TextMorph events
Bijan Parsia
bparsia at email.unc.edu
Sun Feb 3 00:32:33 UTC 2002
On Sat, 2 Feb 2002, Gary McGovern wrote:
> Thanks Bijan,
> Using a transparent button might be a good idea in some places, but I'm generally quite
> happy with overriding the textmorph methods.
Yep.
> As for the using the command key actions, I can't see how they can be used in an object
> model.
Here's one:
Clipboard clipboardText:
(Text string: 'This is a link!'
attribute: (TextDoIt evalString: 'Smalltalk beep'))
Paste the result. It will beep when you click on it. You can include
fairly arbitrary code in the TextDoIt.
To get a URL like, the attribute incantation is:
TextURL new url: 'http://www.squeak.org/'
> But, in windows, alt 6 changes the colour,
On my windows, in a 3.2gamma, alt-6 gives me a menu, the first half of
which are colors, the second half are for the various TextActions.
>alt d opens the browser in "TextMorph
> browse", but couldn't find the equivalent to Ned's example where he
> changed it to "Click me". That wouldn't work.
Look at the class comment for TextAttribute for more hints.
Hope this helps. It won't have *quite* the same behavior as overriding the
events, but it will be consistent with the rest of the system.
Cheers,
Bijan Parsia.
More information about the Squeak-dev
mailing list
|