[Newbies] Re: Text with Link

Hilaire Fernandes hilaire at ofset.org
Fri Dec 7 10:22:26 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Responding to myself as it may be useful to other.
I was mislead by the TextLink class name. PluggableTextAttribute is the
one to use.

| t m |
m := TextMorph new openInWorld.
t := Text string: 'hello ' attribute: TextColor red.
t append: (Text string: 'click ici' attribute: (PluggableTextAttribute
evalBlock: [Morph new openInWorld])).
m contents: t


Hilaire Fernandes a écrit :
> Hilaire Fernandes a écrit :
>> How can I append a link to a text in a text morph?
>>
>> I am trying without success:
>>
>> | t m |
>> m := TextMorphPlus new openInWorld.
>> t := Text
>>     string: 'hello '
>>     attribute: (TextColor red).
>> t append: (Text
>>     string: ' TOTO'
>>     attribute: (TextLink scanFrom: (ReadStream on: 'LMorph new;'))).
> 
> and I forgot the last line
> 
> m contents: (t).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWR7iSAvrR6lz6PQRAqIMAKC1KtyqhDKCgi+YKJWQUuvEpEXfxACfZn0L
RFlPX7ACXObMQCBFJeVOd+U=
=j0rZ
-----END PGP SIGNATURE-----



More information about the Beginners mailing list