Hi Ariel,
Ariel Constenla-Haile wrote:
Hello people,
I think this an issue (may be "type:defect, component: api,
subcomponent: code [IDL source files]/ documentation [Dev's Guide
20.5.2.28]"):
as I said on a mail in extensions-dev
[http://extensions.openoffice.org/servlets/ReadMsg?list=dev&msgNo=897],
there are three service names you can use to implement an XFilePicker or
an XFolderPicker:
XFilePicker:
com.sun.star.ui.dialogs.FilePicker
com.sun.star.ui.dialogs.OfficeFilePicker
com.sun.star.ui.dialogs.SystemFilePicker
XFolderPicker:
com.sun.star.ui.dialogs.FolderPicker
com.sun.star.ui.dialogs.OfficeFolderPicker
com.sun.star.ui.dialogs.SystemFolderPicker
the difference is explained there on the mail (but just covering the
XFilePicker implementation asked by the developer).
FilePicker is the base service and the two others are specializations of
these FilePicker service (of course a IDL definition is missing ->
please file an issue).
I would say FilePicker can be seen more abstract and you should either
use the OfficeFilePicker or the SystemFilePicker. If you use FilePicker
it is not guaranteed which concrete one you get.
Anyway from an API point of view it should be regardless which one you
get but it seems that some implementations of the SystemFilePicker
doesn't support the service contract correct and break existing
solutions like yours.
I am sorry for that but that have to be addressed in the Distro builds.
Juergen
I discovered this by "crash" and error ("crash" because Linux builds,
made by distros, NOT by OOo, often broke my FilePickers implementations),
and by querying the SericeManager [1] every once in a while.
Neither the API reference
http://api.openoffice.org/docs/common/ref/com/sun/star/ui/dialogs/FilePicker.html
nor the new chapter of the Developer's Guide
http://api.openoffice.org/docs/DevelopersGuide/GUI/GUI.xhtml#1_5_2_28_File_Picker
tell us about them.
Making this services public to everyone on the API reference (that's the
first place where a developer looks(or should look) for answers [2]),
could help to prevent headaches to developers.
Thanks,
Ariel.
[1] Very simple:
public static void main(String[] args){
XMultiComponentFactory xMCF = null;
XComponentContext xContext;
try {
xContext = Bootstrap.bootstrap();
xMCF = xContext.getServiceManager();
String[] servicesNames = xMCF.getAvailableServiceNames();
java.util.Arrays.sort(servicesNames);
for (String name : servicesNames) {
System.out.println(name);
}
} catch (BootstrapException ex) {
ex.printStackTrace();
} finally {
System.exit(0);
}
}
[2] Although
* the service names can be found searching OOo website
[for example
http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=20474]
* and there is even an issue
[http://api.openoffice.org/issues/show_bug.cgi?id=81581] reported by an
OOo Basic programmer about the OfficeFilePicker,
* and of course everyone in this mailing list may know about them,
there is still a lack of "official" documentation in the API reference
and the Dev's Guide.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]