Jump to content
Günther Schoch

ToolAPI - Editor Menu - RegisterActionList / UnregisterActionList

Recommended Posts

Hi 

I managed to register an own extension to the IDE. My Plugin Component does register

var edtServices := (BorlandIDEServices as IOTAEditorServices);
var locMenu:= edtServices.GetEditorLocalMenu;
FActList:= TActionList.Create(nil);
FAct:= TAction.Create(nil);
FAct.OnUpdate:= OnUpdate;
FAct.OnExecute:= OnExecute;
FAct.Enabled:= True;
FAct.Caption:= 'My Ext';
FAct.ActionList:= FActList;
locMenu.RegisterActionList(FActList, cEdMenuCatLast, '');

but the documentation does say that I shall unregister as well 

var edtServices := (BorlandIDEServices as IOTAEditorServices);
var locMenu:= edtServices.GetEditorLocalMenu;
locMenu.UnregisterActionList(cEdMenuCatLast);
FActList.Free;

Question: looks as there can only register exactly 1 plugin per Editor Menu Category? What if 2 plugins try the same?!?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×