[Newbies] How to create a TextMorph with Text containing links
Christian Kellermann
ckeen at pestilenz.org
Fri Sep 14 14:56:17 UTC 2018
Hi List!
I want to program a gopher client in squeak and I am a bit stuck
on how to do the rendering. I got the hint that I could use a
TextMorph since there links are a text attribute.
However I am a bit clueless on how this is supposed to fit together.
What I did atm was that for gopher menus I have an OrderedCollection of MenuItems.
Those in turn have implemented their #asText methods. For links I
am returning TextURL objects there.
This is all collected in a GopherPage's #asText method where said
orderedCollection is #join'ed together.
As it turns out though, the TextMorph will render my URL as if the
#printOn: message has been sent to it. TextURLs will show up in
the TextMorph as 'a TextURL'. My guess is that the #join is responsible
for this.
How am I supposed to add URLs into Text?
Kind regards,
Christian
--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20180914/b915a7d8/attachment.sig>
More information about the Beginners
mailing list