Easy steps for enabling an OmniBrowser for Web

7 views
Skip to first unread message

Hernán Morales Durand

unread,
Nov 8, 2009, 12:13:18 PM11/8/09
to omnibro...@googlegroups.com
These are instructions for the following package versions: JSON-cwp.19, KomServices-gc.19, KomHttpServer-GiovanniCorriga.50, DynamicBindings-GiovanniCorriga.10, OB-Morphic-lr.104, OB-Standard-DamienCassou.436, OmniBrowser-DamienCassou.459, OB-Enhancements-dr.352, OB-Web-cwp.61 (all found in the wiresong repository)

0) A little patch: Create an empty method in OBWebBuilder (instance) with selector: explorer: aModel with: aBlock.
1) Create a subclass of OBWebLauncher (YourWebLauncher) for your web omnibrowser.
2) Override #openBrowser in instance side of YourWebLauncher with :

openBrowser

    | window |
   
    window := OBOpenWindowRequest for: YourOmniBrowser new.
    self queueMessage: (JsonObject new
                            receiver: 'id1';
                            selector: 'openWindow';
                            arguments: {window path};
                            yourself)

3) Create a subclass of OBKomHttpService (YourKomHttpService).
4) Override #createLauncher in instance side of YourKomHttpService to answer a response with your new launcher

createLauncher
    | launcher |
   
    launcher := YourWebLauncher new.
    (dispatcher at: 'windows') at: launcher identifier put: launcher.
   
    ^ HttpResponse fromUrl: launcher path
   
5) Open a service

YourKomHttpService startOn: 8989.

6) Point your web browser to http://localhost:8989

Hope you'll find it useful.
Cheers,

Hernán

Colin Putney

unread,
Nov 8, 2009, 12:33:57 PM11/8/09
to omnibro...@googlegroups.com
Hi Hernán,

Thanks for posting this. OB-Web is still a bit rough around the edges,
so I'm glad to see you got it working. OBWebLauncher is just a place
holder at the moment - clearly it needs to be fleshed out. I was
imagining something a bit like the VW launcher: a small window with
some menus and a transcript. It should be pluggable, so you can just
register your browser class with the launcher to get an "open
MyBrowser" entry in one of the menus. Anyhow, nice work.

Colin

Bergel, Alexandre

unread,
Nov 9, 2009, 5:25:30 PM11/9/09
to omnibro...@googlegroups.com
Hi Hernan,

do you have a configuration that I can load (Gofer, Monticello?)
I would like to give a try

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Hernán Morales Durand

unread,
Nov 10, 2009, 4:32:12 PM11/10/09
to omnibro...@googlegroups.com
Hi Alex,
Sure, from a clean latest Pharo-Core please evaluate :

Gofer new
" OB Installation "
squeaksource: 'rb';
addPackage: 'AST-Core';
addPackage: 'Refactoring-Core';
addPackage: 'Refactoring-Spelling';
renggli: 'omnibrowser';
addPackage: 'OmniBrowser';
addPackage: 'OB-Standard';
addPackage: 'OB-Morphic';
addPackage: 'OB-Shout';
addPackage: 'OB-Refactory';
addPackage: 'OB-Regex';
addPackage: 'OB-SUnitIntegration';
renggli: 'unsorted';
addPackage: 'Shout';
" OB Web Support installation "
wiresong: 'ob';
addPackage: 'JSON';
addPackage: 'KomServices';
addPackage: 'KomHttpServer';
addPackage: 'DynamicBindings';
addPackage: 'OB-Web';
" OB Package installation "
squeaksource: 'LightweightClasses';
addPackage: 'ParametrizedCompiler';
addPackage: 'LightweightClasses';
addPackage: 'OBLightweightClass';
" OB Web package installation "
addPackage: 'OBLightweightClassWeb';
load;
recompile.

If you already have an OB installed, you can evaluate the script
starting from " OB Web Support installation ".
Once installed, evaluate:

LCBKomHttpService startOn: 9876

and open a web browser pointing at http://localhost:9876

Cheers,

Hernán

2009/11/9 Bergel, Alexandre <ber...@iam.unibe.ch>:

Bergel, Alexandre

unread,
Nov 11, 2009, 1:35:49 PM11/11/09
to omnibro...@googlegroups.com
I can open a browser, but I have troubles to figure out what are the
different panels. It seems to be different from the traditional code
browser. What is the 'all' tab in the second upper panel? The third
panel?

Cheers,
Alexandre

Lukas Renggli

unread,
Nov 11, 2009, 1:58:01 PM11/11/09
to omnibro...@googlegroups.com
Alexandre, replace LCBSystemBrowser with OBSystemBrowser in
LCBWebLauncher>>#openBrowser. Hernán seems to be working on an top
secret next generation browser ;-)

Lukas

2009/11/11 Bergel, Alexandre <ber...@iam.unibe.ch>:
--
Lukas Renggli
http://www.lukas-renggli.ch

Bergel, Alexandre

unread,
Nov 11, 2009, 5:02:22 PM11/11/09
to omnibro...@googlegroups.com
:-)
I am now familiar with what I see.

Cheers,
Alexandre

Colin Putney

unread,
Nov 11, 2009, 5:02:56 PM11/11/09
to omnibro...@googlegroups.com

On 11-Nov-09, at 10:58 AM, Lukas Renggli wrote:

>
> Alexandre, replace LCBSystemBrowser with OBSystemBrowser in
> LCBWebLauncher>>#openBrowser. Hernán seems to be working on an top
> secret next generation browser ;-)

Well, if you want the regular browser you could just start
OBKomHttpService instead of the LCB version.

Colin

Hernán Morales Durand

unread,
Nov 11, 2009, 5:03:28 PM11/11/09
to omnibro...@googlegroups.com
That's just an instances browser, see the screenshot in the SqS
project page http://www.squeaksource.com/LightweightClasses.html or
http://www.flickr.com/photos/14577317@N06/3813467336/sizes/o/

The second panel includes three class filters, the "final" filter
display classes without subclasses in the selected class category, the
"abstract" display only classes with subclasses, and "all" display
both, like the classic OB system browser.

If a class has instances, the second panel show the number of
instances between parenthesis, i.e. class Pragma in my Pharo-Core has
(751) instances. The third panel list the instances for the selected
class in the second panel.

Each instance shows numbered in the list, following its string
representation and the object size in memory (details in
#sizeInMemory).

You can open the same browser in a Pharo image from: World menu ->
Tools -> More -> Instances Browser . The morphic version of this
browser can modify an instance behavior, i.e. if you select an
instance and modify a method and then compile, the new behavior is
applied only to the selected instance, this is useful for low-level
debugging (specially in Morphic).

If you have suggestions or just want to give some feedback, please let me know.

Cheers,

Hernán


2009/11/11 Bergel, Alexandre <ber...@iam.unibe.ch>:

Hernán Morales Durand

unread,
Nov 11, 2009, 5:07:24 PM11/11/09
to omnibro...@googlegroups.com
Exactly, there's a new weird browser coming soon... :)

Hernán

2009/11/11 Lukas Renggli <ren...@gmail.com>:

Bergel, Alexandre

unread,
Nov 12, 2009, 9:55:52 AM11/12/09
to omnibro...@googlegroups.com
I tried to follow the instruction on http://cs.hernanmorales.com.ar/projects/lightweightClasses/lc-vw-en.php
but apparently #compile:notifying:ifFail: is not defined.

Some test would definitely help understanding

Cheers,
Alexandre
>>>>> DynamicBindings-GiovanniCorriga.10, OB-Morphic-lr.104, OB-
>>>>> Standard-
>>>>> DamienCassou.436, OmniBrowser-DamienCassou.459, OB-Enhancements-
>>>>> dr.

Hernán Morales Durand

unread,
Nov 12, 2009, 12:00:11 PM11/12/09
to omnibro...@googlegroups.com
Thanks for reporting, that's fixed in the last version.
I will write some tests, you can load two basic ones in the
LightweightClassesTest package in the SqS repository.

Regards,

Hernán

2009/11/12 Bergel, Alexandre <ber...@iam.unibe.ch>:
Reply all
Reply to author
Forward
0 new messages