[Cuis-dev] How to extend BrowserWindow menus?

Mariano Montone marianomontone at gmail.com
Tue Jun 4 08:30:31 PDT 2024


Hello,

I would like to extend BrowserWindow menus from my extension.

I have code like this:

MyExtension class>>systemCategoryMenuOptions

     ^ {
             {
                 #itemGroup             ->         10.
                 #itemOrder             ->         10.
                 #label             ->         'search...'.
                 #object       ->         self.
                 #selector             -> #searchCategory:.
                 #icon             ->         #findIcon
             } asDictionary.
         }

But I can't figure out how to access the Browser instance from the 
#searchCategory: method in my extension class. I have no way of passing 
it via #arguments: there either.

It makes sense to be able to, as extensions will want to access the 
current browser state (selected category, etc). Is there a workaround 
for this?

Also, if this is solvable, I will want to extend the class list menu of 
the browser too. But it doesn't use DynamicMenuBuilder anymore, it was 
dropped at some point. Could it be brought back?

Thanks!

     Mariano



More information about the Cuis-dev mailing list