I introduced a new 4 arg protocol for the semantic source links. the old single arg protocol is not that useful since it doesn't allow for dispatching back over the editor... For a proper implementation of the new protocol check one of the TextLink subclasses, for instance: TextClassLink>>#actOnClick:for:in:editor: On OSX/Linux I would simply use OSProcess to open a URL in the system's default browser On 2012-04-10, at 00:55, Eliot Miranda wrote:
On Mon, Apr 9, 2012 at 2:56 PM, phil@highoctane.be <phil@highoctane.be> wrote: I've been investigating with text.
I found things that do work like:
((Text withAll: 'foo') , (Text string: '*' attribute: (TextAnchor new anchoredMorph: EllipseMorph new)) , (Text withAll: 'bar')) asMorph openInWorld.
((Text withAll: 'foo') , (Text string: '*' attribute: (TextAnchor new anchoredMorph: ThemeIcons confirmIcon)) , (Text withAll: 'bar')) asMorph openInWorld.
But doing:
((Text withAll: 'foo') , (Text string: 'some link' attribute: (TextURL new url:'http://philippeback.eu')) , (Text withAll: 'bar')) asMorph openInWorld.
gives me a nice purple 'some link' bit but clicking on it fails with
MessageNotUnderstood: TextURL>>actOnClick:for:in:editor:
Damn! Ideas on how to tackle this?
Take a look at the Squeak code? There I see TextURL implements actOnClickFor: not the 4 arg method. So perhaps the dispatcher has been changed to no longer support the one-argument form. you could either change the one-arg method into the longer form or fix the dispatcher.
TIA Philippe Back
-- best, Eliot