TextMorph events

Gary McGovern gary.play at btopenworld.com
Sat Feb 2 22:29:33 UTC 2002


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.

As for the using the command key actions, I can't see how they can be used in an object 
model.

But, in windows, alt 6 changes the colour, 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.

Thanks!
Gary.

02/02/02 06:07:35, Bijan Parsia <bparsia at email.unc.edu> wrote:

>On Sat, 2 Feb 2002, Gary McGovern wrote:
>
>> I'm not sure what you mean there. To explain a bit better what I need:
>> 
>> I don't want to alter or edit the text. 
>
>The standard way of creating a hyperlink is to add a certain kind of style
>to the text via command-6. Check out TextAction and friends.
>
>If you want the TextMorph itself to be a button, er..., use a button :)
>
>> When I click on the text I
>> want to go to another page in a bookmorph, or other text in a
>> bookmorph, or open a window or other morph, " rather than the I beam
>> sitting in the textmorph for editing.
>
>If you select *all* the text in a text morph, and do the "link" think,
>you'll get pretty close to this behavior, I think. Otherwise, you could
>always cover your morph with a transparent button, maybe, a la hypercard?
>
>[snip]
>John Hinsley wrote:
>> >You can make other kinds of active links this way, including links to 
>> >classes, methods, or URL's."
>> >
>> >But while this works for most text_in_morphs, I don't think it'll work
>> >for a plain old text morph.
>
>The morph itself or the "text" in a "plain ole text morph"?
>
>> > I could never come up with a satisfactory
>> >explanation of why!
>[snip]
>
>Hmm. What's not working? The technique? The cmd-6 thing is a *UI*
>issue. If your textmorph isn't hooked up to the right editor, you can't
>use it.
>
>OTOH, you can certainly add styles to *any* Text, including to the
>plainest of the TextMoprhs...you just have to do it programmatically. I
>show how to do this in on of the SqueakTweak columns. Check out the
>TextEmphasis hierarchy, and Text itself.
>
>Those links aren't restricted to Morphic, BTW.
>
>Cheers,
>Bijan Parsia.
>
>
>






More information about the Squeak-dev mailing list