List Info

Thread: Re: Constants com.sun.star.sdb.application.DatabaseObject




Re: Constants com.sun.star.sdb.application.DatabaseObj ect
user name
2007-02-26 06:47:34
Message de Stephan Bergmann  date 2007-02-26 09:54 :
> Bernard Marcelly wrote:
>> Hello,
>> I have developed a small application which scans
idl files of the SDK to
>> collect all enums and constants. All worked well
for years until I ran
>> my application on SDK 2.1 and it bugged on two
constants:
>> com.sun.star.sdb.application.DatabaseObject.TABLE
>> com.sun.star.sdb.application.DatabaseObject.QUERY
> 
> What do you mean with "it bugged"?
> 

My program scans all Idl files to create a Delphi unit
containing all 
constants (adapting constant names and declarations to
Delphi syntax). 
My program did not expect these constructs in the Idl file:

const long TABLE = com::sun::star::sdb::CommandType::TABLE;
const long QUERY = com::sun::star::sdb::CommandType::QUERY;

Of course it is possible (but more complex) to recognize a
constant from 
another Idl, but what would you do if it refers to an Idl
file that you 
have not yet scanned ? Forward reference may become a real
problem if 
this kind of dependency is widely used. Will we need a make
file for Idl 
files ?

Regards
    Bernard

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: Constants com.sun.star.sdb.application.DatabaseObj ect
user name
2007-02-26 07:04:27
Hi Bernard,

> My program scans all Idl files to create a Delphi unit
containing all 
> constants (adapting constant names and declarations to
Delphi syntax). 
> My program did not expect these constructs in the Idl
file:
> 
> const long TABLE =
com::sun::star::sdb::CommandType::TABLE;
> const long QUERY =
com::sun::star::sdb::CommandType::QUERY;
> 
> Of course it is possible (but more complex) to
recognize a constant from 
> another Idl, but what would you do if it refers to an
Idl file that you 
> have not yet scanned ? Forward reference may become a
real problem if 
> this kind of dependency is widely used.

There should be an include directive in the file, pointing
to
CommandType.idl. So your tool probably should scan included
files, too.
This shouldn't be a problem, since cyclic references should
not happen
(else the regular IDL compiler would already complain).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer        
frank.schoenheitsun.com -
- Sun Microsystems                      http://www.sun.com/star
office -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )