Saving a file with a dialog box

George Elkins elkins at topaz.rutgers.edu
Mon Feb 5 07:19:23 AEST 1990


I have written a small program to rotate 3D graphical objects with the
mouse and I would like to save a rotation matrix into a file with a
menu option.  My (possibly naive) question is how do I get the program
to prompt and read the file name from the user?  Should I use a wsh
window for text I/O?  What then happens if the application was not
launched from a wsh window in the first place?

What I would really like to do is the equivalent of the Macintosh
routine SFPutFile, but on a Silicon Graphics Iris 4D/120 GTX.  For
example, in saving a file on the Macintosh, you would do something
like this:

SFPutFile(SFPutPoint, 'Save File as ...', title, NIL, theReply);

where a standard dialog box asking for a file name to save a file into
appears.  The user can type a file name or cancel (e.g. IF
theReply.good THEN ...).  The filename would be returned in
theReply.fname.

How does one create such a dialog box with buttons and a text field in
4Sight using the GL/DGL interface?

George Elkins



More information about the Comp.sys.sgi mailing list