But in OB that should be easy. You can add, remove and change any
command without the need for an override. The only exception is the
code pane which gets its is commands from the Paragraph editor.

Lukas

On Tuesday, August 10, 2010, Mariano Martinez Peck
<[email protected]> wrote:
> what would be create is to step by step make all menus easily extenesible. 
> Like nowadays with the world menu and pragmas
>
> Carla, once I had a similar problem and the only solution was to override 
> that method with a *MyPackage in that method, and add there the menu entried 
> I wanted...this is completly wrong and sucks...but was the only thing I found
>
> cheers
>
> 2010/8/10 Carla F. Griggio <[email protected]>
>
> Thanks!!! I'll try that! :D
>
> 2010/8/10 laurent laffont <[email protected]>
>
>
>
> 2010/8/10 Carla F. Griggio <[email protected]>
>
>
>
>
>
> Ohh, I understand now.
> I was using the OmniBrowser System Browser.
>
> Either case, I don't know how I can customize the menu that appears when I 
> right click on a category without changing the original code :( I want to 
> "extend" that, not change it, just add a new comand option.
> Do you know if it's possible?
>
> You need to create a subclass of OBCommand which define these 
> methods:execute: what to do when clicking on itgroup: answers a symbol to 
> know in which group it will be displayed in
>
>
>
>
> isActive: answers if the item is enabled/disabledkeystroke: answers the char 
> for shortcutlabel: answers the labelorder: answers the position
> example:
>
>
>
>
>
> OBCommand subclass: #OBCmdRunAutotest instanceVariableNames: ''       
> classVariableNames: ''
>
>
>
>
>       poolDictionaries: ''    category: 'OB-Autotest'
>
>
> execute       |method|        method := target theClass >> target selector.
>
>       OBWaitRequest block: [  AutotestDashboard default triggerAutotestOn: 
> method ].
> group ^ #testing
>
>
>
>
>
> isActive      ^ (requestor isSelected: target) and: [target isKindOf: 
> OBMethodNode ]
> keystroke
>
>       ^ $T
> label ^ 'trigger autotest'
>
>
> order ^ '3'
>
> Look at OBCommand subclasses for more examples.
>
> Cheers, Laurent Laffont
>
> http://pharocasts.blogspot.com/
> http://magaloma.blogspot.com/
>
>
>
>  I can change it adding an option in Morph>>buildMetaMenu: evt, but I wanted 
> to keep that code clean...
>
>
>
>
>
>
>
> On Tue, Aug 10, 2010 at 12:25 AM, Hernán Morales Durand 
> <[email protected]> wrote:
> 2010/8/9 Carla F. Griggio <[email protected]>:
>> Exactly what Guille captured in the image he attached. When I open that
>> window from the World menu it says 'System Browser', although it could
>> actually be an OmniBrowser on the system categories internally... Are they
>> two different things?
>
> I don't know which image you are using, some Pharo images includes the
> OmniBrowser package already loaded and this is what you're probably
> opening from the World menu.
>
> It isn't clear from the world menu which browser (System or Omni)
> you're going to open.
> You mi

-- 
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to