[Solved] Error importing TopSolid_TLB in Delphi (2005-2007)
Moderators: remi77, jacs, Daniel
-
- Private First Class
- Posts: 16
- Joined: Thu Apr 12, 2007 10:36 am
- TopSolid Module: TopSolid'Design
- TopSolid Version: 6.26
- Location: Zutphen
- Contact:
[Solved] Error importing TopSolid_TLB in Delphi (2005-2007)
Hi there,
When i try to import the TopSolid type library into delphi 200x then the resulting component contains corrupt declaration interpretations. There could be two causes for this:
1: An incorrect interpretation of the declarations in the type library by Delphi
2: Some other problem that causes incompatibility issues when importing/conversion to delphi/pascal code.
So my actual question would be: How can i check the correct declaration of the functions and procedures in the TopSolid typelib, so i can correct conversion/implementation errors by hand if possible. There seems to be no in-depth documentation about this, please point me out if I'm wrong...
Regards,
Gert
When i try to import the TopSolid type library into delphi 200x then the resulting component contains corrupt declaration interpretations. There could be two causes for this:
1: An incorrect interpretation of the declarations in the type library by Delphi
2: Some other problem that causes incompatibility issues when importing/conversion to delphi/pascal code.
So my actual question would be: How can i check the correct declaration of the functions and procedures in the TopSolid typelib, so i can correct conversion/implementation errors by hand if possible. There seems to be no in-depth documentation about this, please point me out if I'm wrong...
Regards,
Gert
Hello
I have run into similar issues with Delphi 7. This may be a .NET requirement but the type libraries showed the following issues:
1. Type library declared reserved names for Delphi
2. Duplicate declarations for TApplication, TShape, {maybe TDocument}
I tried renaming the duplicates but the Documents.Add still failed.
I have run into similar issues with Delphi 7. This may be a .NET requirement but the type libraries showed the following issues:
1. Type library declared reserved names for Delphi
2. Duplicate declarations for TApplication, TShape, {maybe TDocument}
I tried renaming the duplicates but the Documents.Add still failed.
-
- Private First Class
- Posts: 16
- Joined: Thu Apr 12, 2007 10:36 am
- TopSolid Module: TopSolid'Design
- TopSolid Version: 6.26
- Location: Zutphen
- Contact:
actually, to be more specific, this is what happens:
When I try to create a component wrapper for the typelib, it creates for example the following class declaration for me:
upon compiling this generates the following error: "[DCC Error] TopSolid_TLB.pas(5191): E2037 Declaration of 'Create' differs from previous declaration"
This implies that the problem lies somewhere in the base class, which is the TOleServer class, but i checked and nothing seems wrong there... I also posted this on some delphi newsgroups, but till now nobody was able to tell me what is causing this trouble. As a side note: this problem only exists when i let delphi create a component wrapper for the TLB, so this leads me to believe that the real problem is caused by delphi, but just maybe there's someone reading this who has a solution for this somewhat odd problem...
When I try to create a component wrapper for the typelib, it creates for example the following class declaration for me:
Code: Select all
TApplication = class(TOleServer)
private
...
protected
...
public
constructor Create(AOwner: TComponent); override; //<- here it goes wrong...
This implies that the problem lies somewhere in the base class, which is the TOleServer class, but i checked and nothing seems wrong there... I also posted this on some delphi newsgroups, but till now nobody was able to tell me what is causing this trouble. As a side note: this problem only exists when i let delphi create a component wrapper for the TLB, so this leads me to believe that the real problem is caused by delphi, but just maybe there's someone reading this who has a solution for this somewhat odd problem...
hobby's are for amateurs
I think the TComponent definition is being created by the Type library which clashes with the native TComponent
See...
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TComponentProperties= class;
{$ENDIF}
TComponent = class(TOleServer)
I tried to rename to:
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TComponentProperties= class;
{$ENDIF}
TComponent2 = class(TOleServer)
private
See...
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TComponentProperties= class;
{$ENDIF}
TComponent = class(TOleServer)
I tried to rename to:
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TComponentProperties= class;
{$ENDIF}
TComponent2 = class(TOleServer)
private
-
- Private First Class
- Posts: 16
- Joined: Thu Apr 12, 2007 10:36 am
- TopSolid Module: TopSolid'Design
- TopSolid Version: 6.26
- Location: Zutphen
- Contact:
Another problem occurred after the first one... When trying to install the components on the component pallet, an error message appears, telling you that the TShape class is already registered in another package. This is due to the same cause as the previous problem. To overcome this one just rename all instances of TShape to TTopShape for example, then recompile, install the package and enjoy using the components!
Note: Although i haven't had problems with it yet, i suppose that the TApplication class could also cause some trouble in the future, so you might also want to rename that class too. Hope this helps anyone struggling his/her way through these issues...
Note: Although i haven't had problems with it yet, i suppose that the TApplication class could also cause some trouble in the future, so you might also want to rename that class too. Hope this helps anyone struggling his/her way through these issues...
hobby's are for amateurs
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact: