[ANN] General WebBrowser package for Pharo4 and Pharo 5 onwards
Hi, Some of you may know or use "ExternalWebbrowser" (maintained in the past by me, started back in the times right after Squeak and based on FFI), also there was an "ExternalWebbrowser2" fork from Sean later. First project got outdated with transition to NB, the second one stopped working for Pharo 5 due to the transition from NativeBoost (NB) to Universal Foreign Function Interface (UFFI). Two projects and now the broken code created a little bit a mess again in finding an easy way in opening an external webbrowser from Pharo. Updating my "ExternalWebbrowser" would easily bring confusion to newbies who thing "ExternalWebbrowser2" is newer. Having a an "ExternalWebbrowser3" would be silly too. So I decided to fix all this by providing a general "WebBrowser" package which now should solve the issue of easily opening an external webbrowser once and for all for primary platforms (Unix/Mac/Windows). The simple design allows to add also other platforms later if necessary. I based it for Pharo 4 on NB and Pharo 5 onwards on the new UFFI - so YES you can use it in both Pharo versions uniformely and the same way - which should simplify things now again. # Project page/Repository http://www.smalltalkhub.com/#!/~TorstenBergmann/WebBrowser # Description General and platform independent WebBrowser access for Pharo 4.0 onwards based on NativeBoost, for Pharo 5.0 onwards based on UFFI - Mac - Unix (Linux flavours) - Windows # Usage WebBrowser openOn: 'http://www.pharo.org' # Installation You can load it either from Configuration Browser (Pharo 4), Catalog/directly by typing "WebBrowser" into Spotter (Pharo 5 onwards) or with the following load expression: Metacello new smalltalkhubUser: 'TorstenBergmann' project: 'WebBrowser'; configuration: 'WebBrowser'; load # Other If you want to reference it in own configs note that version 0.1.0 is for Pharo 4 while 0.2.0 and following is for Pharo 5 onwards. Bye T.
# Usage
WebBrowser openOn: 'http://www.pharo.org'
Fantastic...this is a nice example of using UFFI to call a LibC command, and since it is just using open(1), you can also do something like: WebBrowser openOn: '/users/rob/desktop/enterprisepharo.pdf' To generically open a file! Take care, Rob
On Wed, Apr 13, 2016 at 10:04 PM, Rob Rothwell <r.j.rothwell@gmail.com> wrote:
# Usage
WebBrowser openOn: 'http://www.pharo.org'
Fantastic...this is a nice example of using UFFI to call a LibC command, and since it is just using open(1), you can also do something like:
WebBrowser openOn: '/users/rob/desktop/enterprisepharo.pdf'
To generically open a file!
Take care,
Rob
btw, the might be good for the UFFI documentation to list a few reference projects using it. cheers -ben
The documentation is on github under PharoProgress people should issues pull requests Le 14/4/16 01:15, Ben Coman a écrit :
On Wed, Apr 13, 2016 at 10:04 PM, Rob Rothwell <r.j.rothwell@gmail.com> wrote:
# Usage
WebBrowser openOn: 'http://www.pharo.org'
Fantastic...this is a nice example of using UFFI to call a LibC command, and since it is just using open(1), you can also do something like:
WebBrowser openOn: '/users/rob/desktop/enterprisepharo.pdf'
To generically open a file!
Take care,
Rob btw, the might be good for the UFFI documentation to list a few reference projects using it. cheers -ben
participants (4)
-
Ben Coman -
Rob Rothwell -
stepharo -
Torsten Bergmann