[Cuis-dev] How to extend BrowserWindow menus?

Mariano Montone marianomontone at gmail.com
Tue Jun 4 13:05:49 PDT 2024


After looking more deeply at the implementation of menus, etc, I think 
my problem may be a bit difficult to solve.

So perhaps it is better to forget about this, I've got it more or less 
"solved" for my purposes.

El 4/6/24 a las 12:30, Mariano Montone escribió:
> 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