Le 29 avr. 06 à 11:02 Matin, Tony Spencer a écrit:
To be able to open every file that contains xml then you will have
to allow all text files, and have parsing code in your app that
will then bring up a dialog after Open if the file contains no xml,
since text files may or may not have any hidden file or header info.
As far as I can see there is no other way to do this.
In the past days, there was a "Navigation dialog" plugin (the one
Sven has found, as he said in another post). It allowed, under OS 9,
to control the open/save dialogs (you get an event when a file is
selected, the current folder is changed, etc.), while the open dialog
is being shown.
Also, you have a "Filter" event (or nammed differently) declared such
as "Function Filter(File As FolderItem) As Boolean"). This event is
called for every file before it is shown in the open dialog. If you
return true, the file appears dimmed. So, you can read the file,
determine if it is an xml file and return true or false to allow or
prevent it to be selected.
I don't know if the navigation dialog is still available for Mac OS
X, but the MBS plugin certainly does that (although the open dialog
filter event crashed the last time I tried).
Controling the open dialog while it is open is the best way (imaging
showing a dialog saying "Sorry, the file you tried to open is not
allowed and it should not have appeared in the open dialog.")._______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>