Changeset 9 for trunk/Studio/UCore.pas
- Timestamp:
- Aug 3, 2012, 1:34:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Studio/UCore.pas
r8 r9 18 18 procedure RegisterModules; 19 19 public 20 ModuleManager: TModuleManager;21 API: TLDStudioAPI;22 20 procedure Init; 23 21 end; … … 38 36 begin 39 37 DataModule1 := TDataModule1.Create(nil); 40 API := TLDStudioAPI.Create;41 ModuleManager := TModuleManager.Create(nil);42 ModuleManager.API := API;43 38 end; 44 39 45 40 procedure TCore.DataModuleDestroy(Sender: TObject); 46 41 begin 47 FreeAndNil(ModuleManager);48 FreeAndNil(API);49 42 FreeAndNil(DataModule1); 50 43 end; … … 52 45 procedure TCore.RegisterModules; 53 46 begin 54 ModuleManager.RegisterModule(TLDModuleDebug.Create, True); 55 ModuleManager.RegisterModule(TLDModuleBrainfuck.Create, True); 56 ModuleManager.RegisterModule(TLDModulePascal.Create, True); 57 ModuleManager.InstallMarked; 47 with DataModule1.ModuleManager do begin 48 RegisterModule(TLDModuleDebug.Create, True); 49 RegisterModule(TLDModuleBrainfuck.Create, True); 50 RegisterModule(TLDModulePascal.Create, True); 51 InstallMarked; 52 end; 58 53 end; 59 54 60 55 procedure TCore.Init; 61 56 begin 62 TLDStudioAPI(ModuleManager.API).MainForm := FormMain;63 TLDStudioAPI(ModuleManager.API).MainMenu := FormMain.MainMenu;64 TLDStudioAPI(ModuleManager.API).FileTypes := DataModule1.FileTypes;65 57 RegisterModules; 66 58 end;
Note:
See TracChangeset
for help on using the changeset viewer.