At 12:48 PM -0400 10/15/2000, Lingo-L Digest wrote:
>Date: Sat, 14 Oct 2000 11:53:01 -0400
>From: "John Horn (Home)" <[EMAIL PROTECTED]>
>Subject: <lingo-l> fileio
>
>using fileio and displayOpen command, is it possible to limit the file types
>that can be seen if the browse window?

Yes, refer to the setFilterMask() method

The sytnax differs on mac and Windows. Off the top of my head, on the Mac, it takes 
four character type codes, such as "TEXT". On the PC, it takes a name and an 
extension, such as "Text Files, *.txt".

So it would be something like this for text files (untested off the top of my head)

fileObj = new (xtra "fileio")

if the platform contains "Windows" then
  setFilterMask (fileObj, "Text Files, *.txt"
else
  setFilterMask (fileObj, "TEXT")
end if

displayOpen (fileObj, whatever...)

Don't forget to set the file type using setFinderInfo as I recall) if you are writing 
out your files on the Mac. Otherwise, when you set the filter mask, you won't be able 
to see the files you've previously written (i.e. they won't appear in the dialog box 
if they have the wrong type)

If you can't figure it out, let me know. Many more details are in the External Files 
chapter in Lingo in a Nutshell.

Regards,
Bruce

Bruce Epstein
Zeus Productions
[EMAIL PROTECTED]
732-940-2800



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to