Are you wanting to do this through an Open Dialog or silently? If you
are using RB2006 and an open dialog you create a file types object,
(right click in the project and select Add then File Types Set). In the
File Types set you specify the display names, the Mac Type/Creator and
extensions. For example the following is a set for two image file types
in a File Types Set called ImageFileTypes:
Display Name: JPEG File
Object Name: JPEGFile
MacType: JPEG
MacCreator: ????
Extensions: .jpg;.jpeg
Display Name: TIFF File
Object Name: TIFFFile
MacType: TIFF
MacCreator: ????
Extensions: .tif;.tiff
Then when you use the open Dialog you specify it to filter what is shown
by all the file types in the File Types Set as follows.
Dim dlg as OpenDialog
Dim f as FolderItem
dlg= New OpenDialog
dlg.InitialDirectory= SpecialFolder.Desktop
dlg.Title="Select a an Image File"
dlg.Filter = ImageFileTypes.All
f=dlg.ShowModal()
If f <> Nil then
// Do something with the image file
Else
//User Cancelled
End if
HTH
Tom
> A question regarding matching FolderItem (FI) file
> types/extensions against a list of such types/extensions....
>
> So I have a list of extensions of acceptable file types.
>
> I also have a folder with multiple files of various types.
>
> I want to select all the files in that folder that are of a
> type/ extension that matches any of those found in the list
> of acceptable types/extensions.
>
> Is there a call that will see if a file's type/extension is
> in that list? Or do I have to do a series of hard-wired ORs;
> one for every item in the list?
>
> Regards,
>
> Chuck
_______________________________________________
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>