ScratchPlugin>>primOpenURL: (was Re: [squeak-dev] The Trunk: EToys-tfel.211.mcz)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ScratchPlugin>>primOpenURL: (was Re: [squeak-dev] The Trunk: EToys-tfel.211.mcz)

timrowledge

> On 30-08-2016, at 10:26 AM, [hidden email] wrote:
> Item was changed:
>  ----- Method: EtoyDAVLoginMorph>>launchBrowser (in category 'actions') -----
>  launchBrowser
>
>   ActiveWorld addMorph: self buildPanel centeredNear: Sensor cursorPoint.
> + (Smalltalk classNamed: 'ScratchPlugin') ifNotNil: [:sp | sp primOpenURL: self url].
> - ScratchPlugin primOpenURL: self url.

I’m thinking that this probably ought to be moved to OSProcess and used via something that does at least a little checking that a URL is involved.

And the assorted other ScratchPlugin graphics effects referenced might be better in a graphics plugin - or even added to bitblt(?) or maybe even tested to check they’re worth doing as plugin calls these days.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
A bug in the code is worth two in the documentation.



Reply | Threaded
Open this post in threaded view
|

Re: ScratchPlugin>>primOpenURL: (was Re: [squeak-dev] The Trunk: EToys-tfel.211.mcz)

timfelgentreff
Yes, I think the graphics filters could nowadays be done in-image. This method in particular I haven't stepped through and understood yet. There is a lot of cruft :)

On Tue, 30 Aug 2016 at 19:12 tim Rowledge <[hidden email]> wrote:

> On 30-08-2016, at 10:26 AM, [hidden email] wrote:
> Item was changed:
>  ----- Method: EtoyDAVLoginMorph>>launchBrowser (in category 'actions') -----
>  launchBrowser
>
>       ActiveWorld addMorph: self buildPanel centeredNear: Sensor cursorPoint.
> +     (Smalltalk classNamed: 'ScratchPlugin') ifNotNil: [:sp | sp primOpenURL: self url].
> -     ScratchPlugin primOpenURL: self url.

I’m thinking that this probably ought to be moved to OSProcess and used via something that does at least a little checking that a URL is involved.

And the assorted other ScratchPlugin graphics effects referenced might be better in a graphics plugin - or even added to bitblt(?) or maybe even tested to check they’re worth doing as plugin calls these days.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
A bug in the code is worth two in the documentation.





Reply | Threaded
Open this post in threaded view
|

Re: ScratchPlugin>>primOpenURL: (was Re: [squeak-dev] The Trunk: EToys-tfel.211.mcz)

timrowledge

> On 31-08-2016, at 12:32 AM, Tim Felgentreff <[hidden email]> wrote:
>
> Yes, I think the graphics filters could nowadays be done in-image. This method in particular I haven't stepped through and understood yet. There is a lot of cruft :)

It shouldn’t too big a project for someone into graphic algorithms.

The primURL thing is a fairly serious issue for safety though since it simply appends the input string to ‘xdg-open ‘ and does a system call. I’m reasonably certain you can shut down nuclear reactors that way. Probably not the best idea. Simply calling it without some checking of the input to make sure it is a URL is not the best idea. Real operating systems like RISC OS have much less dangerous ways to launch a webpage.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Trojan:  Storage device for replicating codes...