Board index » delphi » undeclared identifier: Class_Application

undeclared identifier: Class_Application


2006-07-13 07:57:39 AM
delphi267
Hi,
I'm trying to get the AHWord97 wrapper for Word by Allan Harkness (available
on torry's) to compile in delphi 7.
It uses the Word_tlb.pas, so I imported the type library from MSWord8.olb
saved as the same (Word_tlb.pas) (even though I already have the word 97
server components installed), but get the following compile errors:
Undeclared identifier: 'Class_Application', 'CoApplication_' , 'CoGlobal',
'Application_', VarIsNull.
Any ideas what is missing?
Thank you
Rael
 
 

Re:undeclared identifier: Class_Application

Hi,
Quote
I'm trying to get the AHWord97 wrapper for Word by Allan Harkness (available
on torry's) to compile in delphi 7.

It uses the Word_tlb.pas, so I imported the type library from MSWord8.olb
saved as the same (Word_tlb.pas) (even though I already have the word 97
server components installed), but get the following compile errors:
Undeclared identifier: 'Class_Application', 'CoApplication_' , 'CoGlobal',
'Application_', VarIsNull.
Any ideas what is missing?
If I understand correctly, you are trying to avoid using
the Delphi 7 pre-import, ..\delphi7\Ocx\Servers\Word97.pas by
importing your own new one? If so, then the new import
might be picking up some alias's from
..\delphi7\bin\tlibimp.sym. Open that file and look at
the automatic alias'ing that happens for the Word CLSID:
Application=WordApplication
What you probably want here is either nothing or alias's
that match what was aliased at the time of AHWord's creation.
For example, they might have had something like:
Application=ClassApplication
or
Application=_Application
Global=CoGlobal
etc.
So you might need to edit tlibimp.sym and re-import.
They don't give the older Word_tlb.pas with the source?
It should still work I think.
The VarIsNull error might be a different category of
error. Variants tend to change over versions.
--Craig
 

Re:undeclared identifier: Class_Application

Quote
Application=ClassApplication
I meant
Application=Class_Application
Quote
Variants tend to change over versions.
Just came back to me: 'Variants' had to added
to the 'uses' list when upgrading older code when
things that had previously been duplicated in
multiple VCL units were moved to the Variants unit.
--Craig
 

Re:undeclared identifier: Class_Application

Quote
So you might need to edit tlibimp.sym and re-import.
They don't give the older Word_tlb.pas with the source?
Well instead I just changed the few "mismatches" in the AHWord.pas to the
names in the Word_tlb.
I wouldn't have guessed that "Class_Application" was actually
WordApplication, but once you pointed me to the tlibimp, I understood what
was happening.
All working now - Thanks very much
Rael