wxHtmlWindow - handling clicks on links?

rtg at rochester.rr.com rtg at rochester.rr.com
Tue Jun 28 14:23:40 UTC 2005


We could easily make the default behavior work whichever we want. There's 
probably an existing Squeak package that opens URLs, but I don't know for
sure. If there isn't, I think we could use WxMimeTypesManager and 
WxFileType to construct a system command that could be sent to wxExecute.

.. Rob


----- Original Message -----
From: Cees De Groot <cdegroot at gmail.com>
Date: Tuesday, June 28, 2005 7:20 am
Subject: Re: wxHtmlWindow - handling clicks on links?

> A patch would be great. I have a build environment in the meantime, so
> incorporating a patch should be easy enough.
> 
> Come to think of it - maybe the default implementation of
> onLinkClicked: should be that it hands off the URL to the OS. Then
> with an override you can always change it, but I think that this would
> be a very sensible default. There's a Squeak package to do this in a
> system-independent way, IIRC, not?
> 
> On 6/28/05, rtg at rochester.rr.com <rtg at rochester.rr.com> wrote:
> > Cees,
> > 
> > This requires a VM callback that I haven't implemented yet. You 
> need to be
> > able to subclass WxHtmlWindow and define the method #onLinkClicked:
> > with something like:
> > 
> > onLinkClicked: linkInfo
> >    "do something with linkInfo getHref"
> > 
> > I'll work up a patch for this and the other callbacks in 
> WxHtmlWindow.> 
> > .. Rob
> > 
> > 
> > ---------------------------------
> > 
> > From: Cees De Groot <cdegroot at gmail.com>
> > Date: June 28, 2005 5:43:39 AM EDT
> > To: wxsqueak at discuss.squeakfoundation.org
> > Subject: wxHtmlWindow - handling clicks on links?
> > Reply-To: Cees De Groot <cdegroot at gmail.com>
> > 
> > 
> > Hi,
> > 
> > We display HTML in our interface at various places, and what we'd 
> like> is that anchors, when clicked, are sent off to the OS to be 
> handled> (so http:// will open the user's browser, mailto: the 
> user's mail
> > program, etcetera).
> > 
> > I can't see how to do this - any hints?
> > 
> > TIA,
> > 
> > Cees
> > 
> > 
> > 
> > 
> > 
> >
> 



More information about the Wxsqueak mailing list