[Newbies] Omnibrowser help

Rob Rothwell r.j.rothwell at gmail.com
Tue Mar 18 20:01:39 UTC 2008

On Tue, Mar 18, 2008 at 10:59 AM, David Röthlisberger <squeak at c3com.ch>

> 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'!
| 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'!
^true.! !

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20080318/e6ea9074/attachment-0001.htm

More information about the Beginners mailing list