Hello Matthias,
> I'd like to open the DSB from a script. However, all code I could find
> (including the code created by recording a macro for the "F4" key)
> toggles it between on and off. But I want to turn it on
> unconditionally, i.e. if it is already open it should STAY open and
> not close again.
Along those lines, you need to add syntactic sugar:
disp = frame.queryDispatch( ".component:DB/DataSourceBrowser",
"_beamer" );
disp.dispatch( ".component:DB/DataSourceBrowser" )
This will always create a new DSB instance, and replace an existing one.
If you want to check whether the "_beamer" frame already contains a DSB,
something like the following should do:
beamer = frame.findFrame( "_beamer", ... )
' don't pass the CREATE flag here
' check form NULL return value
...
exists = beamer.getController.supportsService(
"com.sun.star.sdb.DataSourceBrowser" )
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems http://www.sun.com/staroffice -
- OpenOffice.org Database http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]