Hi, 

I would like to declare a control variable (reference) in StarBasic and assign 
an existing control to it 
from an existing dialog like:

Dim textField  As com.sun.star.text.TextField 
textField = dialog.getControl("txtKlantNr")

Hoewever the error I get here is: "unknown data type 
com.sun.star.text.TextField" and the code
won't run. Declaring with 'as new' like: 

Dim textField  As new com.sun.star.text.TextField 

generates the following error:

"Object not accessible. Invalid object reference." but the code will run anyway 
although it won't
run as intended.

Declaring the object as Object will give me no errors but I do not want to 
declare it
as an Object since I know for sure it is a com.sun.star.text.TextField. This 
way it
will be easier for me and others to know with which interfaces we are dealing 
with, and
to look these up in the documentation.

Any suggestions?

Regards,
Sven

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to