rainwatr@ucqais.uc.edu (Donald J. Rainwater) (02/22/89)
I have a stack that I've created for use in our Macintosh labs on campus. It has buttons for the applications that we provide (MS Word, Excel, etc.), and also a button for opening an external application. This button has open "your application" in the script so that the dialog box pops up and says "Where is your application?" and provides the standard file dialog. The reason for this button is so that student users can bring in their own software and use it on our Macs. After all this introductory information, my question is this. Is there a way to limit the capabilities of the file dialog box? What I would like to do is limit the file selection to the floppy drive only. Does any- one have an XCMD that will provide file selection capabilites from the floppy drive only? Any information is greatly appreciated. -- Don Rainwater, University of Cincinnati Computer Center rainwater@ucbeh.san.uc.edu rainwatr@ucqais.uc.edu ccondjr@ucccvm1.bitnet
trebor@biar.UUCP (Robert J Woodhead) (02/22/89)
In article <1600@ucqais.uc.edu> rainwatr@ucqais.uc.edu (Donald J. Rainwater) writes: > After all this introductory information, my question is this. Is >there a way to limit the capabilities of the file dialog box? You will have to use an XCMD that lets you put up a custom SFGetFile dialog. In it you will define a custom fileFilter proceedure (see IM I-517 for info on the standard file package). This procedure will vote "yea" or "nay" on any particular file. The filefilter is pased a pointer to a parameter block that contains the contents of a GetFileInfo call on the file. Call this pointer Info. Info^.ioVRefnum contains the volume reference number of this file. Use that to call PBHGetVolInfo. the ioVDRefNum field contains the driver number of the volume (see IM IV-123,124). If this is -5, it is the ".SONY" floppy disk driver [WARNING:I don't know if the new high density floppies use the same driver]. So you return TRUE if ioVDRefNum=-5, and FALSE otherwise. This means your user can click the drive button all he wants, but will never see any applications on non-floppy drives!