Fwd: adding 'Open in new window' to Scamper
Jason Rogers
jacaetevha at fast-mail.org
Thu Apr 18 14:30:16 UTC 2002
All-
I am trying this again... My first attempt to send came back with
errors from Mailman. I hope you don't mind wading through the forward
tags here.
jason
On Wed, 17 Apr 2002 18:05:35 +0000, "Jason Rogers"
<jacaetevha at fast-mail.org> said:
> Newbie here...
>
> I wanted to add the capability to open a new Scamper window on a
> particular url, so I added the following (which is essentially the
> #jumpToNewUrl:
>
> openNewBrowserOnUrl
> "change to a new, user-specified page, in a new browser"
> | newUrl |
> newUrl _ FillInTheBlank request: 'url to visit' initialAnswer: currentUrl toText.
> (newUrl isNil or: [ newUrl isEmpty ]) ifTrue: [ 'browser:about' ].
> Scamper openOnUrl: newUrl.
>
> and changed the #menu:shifted to be:
>
> menu: menu shifted: shifted
> "added 'back' and 'forward' menu options: Aibek 4/18/99"
> "added 'openNewBrowserOnUrl' menu to options: JasonRogers 04/17/02"
> | lines selections linePositions |
> lines _ 'back
> forward
> open in new browser
> new URL
> history
> view source
> inspect parse tree
> go to start page
> edit start page
> bookmark'.
> linePositions _ #(3 4 7 ).
> selections _ #(#back #forward #openNewBrowserOnUrl #jumpToNewUrl #displayHistory #viewSource #inspectParseTree #visitStartPage #editStartPage #bookmark ).
> downloadingProcess
> ifNotNil:
> [lines _ lines , String cr , 'stop downloading'.
> linePositions _ linePositions , selections size asOrderedCollection.
> selections _ selections , #(#stopEverything )].
> menu
> labels: lines
> lines: linePositions
> selections: selections.
> ^ menu
>
> I have a few questions:
>
> 1. How do I limit the Context menu to only show the
> 'openNewBrowserOnUrl' when hovering over a link?
> 2. When I am hovering over a link, how do I grab the URL that is under
> the link?
>
> I am not as interested in implementing #1 as I am #2.
>
> Any help would be much appreciated.
>
> Thanks.
> =jason
> --
> Jason Rogers
> jacaetevha at fast-mail.org
--
Jason Rogers
jacaetevha at fast-mail.org
More information about the Squeak-dev
mailing list
|