Omnibrowser help

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

Omnibrowser help

Rob Rothwell
Are there some tips/documentation somewhere on getting the most out of the OmniBrowser?  The MulitpleSelection browser looks interesting (sort of like the tabbed browser in VisualWorks), but I don't quite understand its behaviour and what method it decides to show in which pane when you move around or save changes.

On the same topic, can anyone point me toward how I could add a new item to the class context menu in the OmniBrowser?  I want to add a new template selection menu item (like "new class template" and "new trait template") because I have created a method that creates TWO classes at the same time for an Aida application (A domain model class AND its associated WebApp class).

Thanks,

Rob Rothwell

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

David Röthlisberger

> Are there some tips/documentation somewhere on getting the most out of
> the OmniBrowser?  

I suggest to have a look at this paper, it is dedicated to user and developers of
OmniBrowser:
http://www.iam.unibe.ch/~scg/Archive/Papers/Berg07cOmnibrowser.pdf


 > The MulitpleSelection browser looks interesting (sort
> of like the tabbed browser in VisualWorks), but I don't quite understand
> its behaviour and what method it decides to show in which pane when you
> move around or save changes.

I'm actually right now working on a documentation for this browser, it should be
finished soon.

> On the same topic, can anyone point me toward how I could add a new item
> to the class context menu in the OmniBrowser?  I want to add a new
> template selection menu item (like "new class template" and "new trait
> template") because I have created a method that creates TWO classes at
> the same time for an Aida application (A domain model class AND its
> associated WebApp class).

First, create a subclass of OBCommand. Then you need to implement at least the
methods #execute, #label and #isActive (have a look at eg. OBCmdNewClassTemplate).
Finally, you can add a method called eg. 'cmdAIDATemplate' to OBCodeBrowser or a
subclass of it. It is important that this method starts with 'cmd'. When you then
start a new system browser, the command should be available (if #isActive answers
true for the selected class).


David
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Rob Rothwell
On Tue, Mar 18, 2008 at 10:59 AM, David Röthlisberger <[hidden email]> wrote:
I suggest to have a look at this paper, it is dedicated to user and developers of
OmniBrowser:
http://www.iam.unibe.ch/~scg/Archive/Papers/Berg07cOmnibrowser.pdf

Thanks...some "light reading" for a Sunday afternoon!  How hard do you think it would be to use the OmniBrowser model to hook up to non-morphic views?  I am exploring the idea of a web-based design layout tool for web development (using Aida), and the next logical step is to create a browser in a prototype-ui window or something that would let you wire your model to the design on the page.
 
I'm actually right now working on a documentation for this browser, it should be
finished soon.

You know, this is a great time to be new to Squeak.  There is an awful lot of good work going on out there.  I always thought I was a decent programmer, just not world class!  But, as in the example above, much of the "heavy lifting" has been done already, and the problem I describe may be just hard enough to be interesting to me, but actually doable thanks to the work of others!
 
First, create a subclass of OBCommand. Then you need to implement at least the
methods #execute, #label and #isActive (have a look at eg. OBCmdNewClassTemplate).
Finally, you can add a method called eg. 'cmdAIDATemplate' to OBCodeBrowser or a
subclass of it. It is important that this method starts with 'cmd'. When you then
start a new system browser, the command should be available (if #isActive answers
true for the selected class).

Thanks for this.  It seems very modular and easy to extend (based on your description)!  I'll give it a shot! 

Rob

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Lukas Renggli
> Thanks...some "light reading" for a Sunday afternoon!  How hard do you think
> it would be to use the OmniBrowser model to hook up to non-morphic views?  I
> am exploring the idea of a web-based design layout tool for web development
> (using Aida), and the next logical step is to create a browser in a
> prototype-ui window or something that would let you wire your model to the
> design on the page.

See OB-Web.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Rob Rothwell
On Tue, Mar 18, 2008 at 12:48 PM, Lukas Renggli <[hidden email]> wrote:
See OB-Web.

Thank you both.

In the Squeak Universe, it always seems best to ask before you start.  Someone else has usually been there first... !

Rob

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Rob Rothwell
In reply to this post by David Röthlisberger
On Tue, Mar 18, 2008 at 10:59 AM, David Röthlisberger <[hidden email]> wrote:
First, create a subclass of OBCommand. Then you need to implement at least the
methods #execute, #label and #isActive (have a look at eg. OBCmdNewClassTemplate).
Finally, you can add a method called eg. 'cmdAIDATemplate' to OBCodeBrowser or a
subclass of it. It is important that this method starts with 'cmd'. When you then
start a new system browser, the command should be available (if #isActive answers
true for the selected class).

When I do this, I get TWO menu items, and if no class is selected in the class pane, I get one all by itself.  I just copied the normal new class template code to execute as follows:

'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 18 March 2008 at 3:58:54 pm'!
OBCommand subclass: #OBCmdNewWebAppTemplate
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'WebAppBuilder'!

!OBCmdNewWebAppTemplate methodsFor: 'as yet unclassified' stamp: 'rjriv 3/18/2008 15:58'!
execute
| class definition |
class := target theNonMetaClass.
definition := (OBClassDefinition 
environment: class environment 
template: (Class template: class category)).
requestor announce: (OBDefinitionChanged definition: definition)! !

!OBCmdNewWebAppTemplate methodsFor: 'as yet unclassified' stamp: 'rjriv 3/18/2008 15:43'!
isActive
^true.! !

!OBCmdNewWebAppTemplate methodsFor: 'as yet unclassified' stamp: 'rjriv 3/18/2008 15:36'!
label
^ 'new web app template'! !

Rob


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

David Röthlisberger

 > When I do this, I get TWO menu items, and if no class is selected in the
 > class pane, I get one all by itself.  I just copied the normal new class
 > template code to execute as follows:


 > !OBCmdNewWebAppTemplate methodsFor: 'as yet unclassified' stamp: 'rjriv
 > 3/18/2008 15:43'!
 > isActive
 > ^true.! !

Change this to read:

isActive
    ^(target isKindOf: OBClassNode) and: [requestor isSelected: target]


David

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Rob Rothwell
On Tue, Mar 18, 2008 at 4:49 PM, David Röthlisberger <[hidden email]> wrote:
Change this to read:

isActive
   ^(target isKindOf: OBClassNode) and: [requestor isSelected: target]

Thanks.  That's why I'm still asking beginner questions...I don't know why my brain didn't even go check that method out.  I think I was just thinking "of course I want it to be active!" 

Rob

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

David Röthlisberger
In reply to this post by David Röthlisberger

>  > The MulitpleSelection browser looks interesting (sort
>> of like the tabbed browser in VisualWorks), but I don't quite
>> understand its behaviour and what method it decides to show in which
>> pane when you move around or save changes.
>
> I'm actually right now working on a documentation for this browser, it
> should be finished soon.

I have now put this documentation online:
http://scg.iam.unibe.ch/Research/Hermion
(see in particular the wiki page linked).

If you still have any questions after reading this documentation, just
tell me, then I will extend the doc.

David

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Rob Rothwell
On Sat, Mar 22, 2008 at 1:59 PM, David Röthlisberger <[hidden email]> wrote:
I have now put this documentation online:
http://scg.iam.unibe.ch/Research/Hermion
(see in particular the wiki page linked).

If you still have any questions after reading this documentation, just
tell me, then I will extend the doc.

Thanks, I will!

Rob

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Rob Rothwell
In reply to this post by David Röthlisberger
On Sat, Mar 22, 2008 at 1:59 PM, David Röthlisberger <[hidden email]> wrote:
I have now put this documentation online:
http://scg.iam.unibe.ch/Research/Hermion
(see in particular the wiki page linked).

Thanks again...the multiple pane browser makes a lot more sense now!
 
If you still have any questions after reading this documentation, just
tell me, then I will extend the doc.

Now I am interested in Hermion...

Rob

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Omnibrowser help

Sean P. DeNigris
Administrator
In reply to this post by David Röthlisberger
David Röthlisberger wrote
First, create a subclass of OBCommand. Then you need to implement at least the
methods #execute, #label and #isActive (have a look at eg. OBCmdNewClassTemplate).
Finally, you can add a method called eg. 'cmdAIDATemplate' to OBCodeBrowser or a
subclass of it. It is important that this method starts with 'cmd'.
David, if you're still on the list - thank you! Three years later, this post saved my day :)
Cheers,
Sean