My app uses runtime libraries, and also depends on the teepro extensions. Unfortunately the initialization section of the units are not called if they are not in the uses list of the main app, or if no code from the unit is directly linked into my own units.
Is there an 'easy' way to ensure all "pro" extensions are activated? I can do this by calling LoadPackage('Teepro916.bpl'), or by adding all pro units to tot uses list of the main app.
Any other useful tips?
Regards - Hans
Activate TeePro extensions in my app.
-
- Newbie
- Posts: 16
- Joined: Thu Nov 10, 2011 12:00 am
Re: Activate TeePro extensions in my app.
Hi Hans,
Excuse us for the delay here.
We haven' forgotten you and we'll be back to you asap.
Excuse us for the delay here.
We haven' forgotten you and we'll be back to you asap.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Activate TeePro extensions in my app.
Hi Hans,
What about adding TeeEditPro unit to your uses section? Which exact problem do you have? Any specific unit missing?
Thanks in advance.
What about adding TeeEditPro unit to your uses section? Which exact problem do you have? Any specific unit missing?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 16
- Joined: Thu Nov 10, 2011 12:00 am
Re: Activate TeePro extensions in my app.
My app uses a plugin system for extenstions. These plugins are simply runtime packages that are in a subfolder and loaded during runtime.
In order to do this I have a kernel bpl and a very minimalistic exe file that depends only on some vcl runtime libs and the kernel bpl.
The kernel itself depends on the tchart libs, but does not require the tchart pro extensions.
Nevertheless, our end users want to use some of the pro features. But the pro features are not visible because the initialization sections of the corresponding packages are not executed when they are not explicitely mentioned in the exe uses list.
so: the problem is : I cannot see the tchartpro extensions in my tchart editor, only the tchart basic functionality
mycurrent solution now is a routine that scans all loaded bpl's and ensures all units are initialized like this:
(off course there is also a counterpart for this)
Should adding TeeEditPro to my uses list (preferably only in my kernel.bpl) add/register all pro features? - Using XE2
(I was delayed a bit too - I had a one-week holiday )
Regards - Hans
In order to do this I have a kernel bpl and a very minimalistic exe file that depends only on some vcl runtime libs and the kernel bpl.
The kernel itself depends on the tchart libs, but does not require the tchart pro extensions.
Nevertheless, our end users want to use some of the pro features. But the pro features are not visible because the initialization sections of the corresponding packages are not executed when they are not explicitely mentioned in the exe uses list.
so: the problem is : I cannot see the tchartpro extensions in my tchart editor, only the tchart basic functionality
mycurrent solution now is a routine that scans all loaded bpl's and ensures all units are initialized like this:
Code: Select all
procedure InitializePackages(VAR aPackageList:THandleList);
function lclInPackageList(const aHandle:Thandle):boolean;
begin
Result:=Assigned(aPackageList) and (aPackageList.IndexOf(aHandle)>=0)
end;
function lclIsPackage(aHandle:THandle):boolean;
begin
Result:=(aHandle<>0)
and (GetProcAddress(aHandle, 'Initialize')<>nil)
and (GetProcAddress(aHandle, 'Finalize')<>nil);
end;
VAR Module:PLibModule;
begin
Module := LibModuleList;
while Module <> nil do
begin
if (Module.Instance<>0)
and not lclInPackageList(Module.Instance)
and lclIsPackage(Module.Instance) then
begin
if aPackageList=nil then
aPackageList:=THandleList.Create;
try
InitializePackage(Module.Instance);
aPackageList.Add(Module.Instance);
except
raise EModuleListError.CreateFmt('InitializePackages failed for [%s]',[ModuleFileName(Module.Instance)]);
end;
end;
Module:=Module.Next;
end;
end;
Should adding TeeEditPro to my uses list (preferably only in my kernel.bpl) add/register all pro features? - Using XE2
(I was delayed a bit too - I had a one-week holiday )
Regards - Hans
Re: Activate TeePro extensions in my app.
Hi Hans,
As you'll see, the Pro classes are registered in the beginning of TeeEdiPro.pas. Isn't adding that unit to you uses clause solving the issue for you?
As you'll see, the Pro classes are registered in the beginning of TeeEdiPro.pas. Isn't adding that unit to you uses clause solving the issue for you?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |