Ignore:
Timestamp:
Aug 3, 2012, 1:55:46 PM (12 years ago)
Author:
chronos
Message:
  • Fixed: Module Debug menu items creation and destruction.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StudioModules/LDModuleDebug/ULDModuleDebug.pas

    r5 r10  
    7272    AViewFormMemory.Caption := SViewFormMemory;
    7373    RegisterAction(AViewFormMemory);
     74    // Menu
    7475    MenuItemViewDebug := TMenuItem.Create(nil);
    7576    MenuItemViewDebug.Caption := SDebug;
     
    7879    MenuItemViewFormOutput.Action := AViewFormOutput;
    7980    RegisterMainMenuItem(MenuItemViewFormOutput, MenuItemViewDebug, 0);
     81    MenuItemViewFormInput := TMenuItem.Create(nil);
     82    MenuItemViewFormInput.Action := AViewFormInput;
     83    RegisterMainMenuItem(MenuItemViewFormInput, MenuItemViewDebug, 1);
     84    MenuItemViewFormMemory := TMenuItem.Create(nil);
     85    MenuItemViewFormMemory.Action := AViewFormMemory;
     86    RegisterMainMenuItem(MenuItemViewFormMemory, MenuItemViewDebug, 2);
     87    MenuItemViewFormCPU := TMenuItem.Create(nil);
     88    MenuItemViewFormCPU.Action := AViewFormCPU;
     89    RegisterMainMenuItem(MenuItemViewFormCPU, MenuItemViewDebug, 3);
    8090  end;
    8191  inherited;
     
    8696  inherited;
    8797  with TLDStudioAPI(API) do begin
     98    UnregisterMainMenuItem(MenuItemViewFormOutput);
     99    FreeAndNil(MenuItemViewFormOutput);
     100    UnregisterMainMenuItem(MenuItemViewFormInput);
     101    FreeAndNil(MenuItemViewFormInput);
     102    UnregisterMainMenuItem(MenuItemViewFormMemory);
     103    FreeAndNil(MenuItemViewFormMemory);
     104    UnregisterMainMenuItem(MenuItemViewFormCPU);
     105    FreeAndNil(MenuItemViewFormCPU);
     106    UnregisterMainMenuItem(MenuItemViewDebug);
     107    FreeAndNil(MenuItemViewDebug);
    88108    UnregisterForm(FormOutput);
    89109    UnregisterForm(FormInput);
Note: See TracChangeset for help on using the changeset viewer.