home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!darwin.sura.net!jvnc.net!nuscc!shankar!taihou
- From: taihou@shankar.iss.nus.sg (Tng Tai Hou)
- Subject: XCMD and filename help!!!
- Message-ID: <1992Jul28.111455.21981@nuscc.nus.sg>
- Originator: taihou@shankar
- Sender: usenet@nuscc.nus.sg
- Organization: Institute of Systems Science, NUS, Singapore
- Date: Tue, 28 Jul 1992 11:14:55 GMT
- Lines: 31
-
- Hi.
-
- I am writing an XCMD that that takes in a targa file and displays
- it on the HyperCard/SuperCard window. I am not using any fancy
- HyperCard 2.x xwindow calls. The syntax is
-
- ShowTarga filename, x, y
-
- Unfortunatelly, I run into some coding problems in manipulating
- files. Internally, my code must require both the correct
- vRefNum and a pascal filename:
-
- OSErr ShowTarga (short vRefNum, StringPtr fn, short x, short y);
-
- I really don't understand it at all. The only way I got this to
- work was to follow exactly the following:
-
- 1. Make sure that my folder or stack is 1 level in the hard disk and
- not anywhere else, including the desktop.
- 2. I must write my code such that vRefNum is zer0 for the default volume.
- 3. Then from HyperCard, I must specify the FULL path:
- "Volume:MyFolder:MyTargaFile"
-
- Is there a more generic way of writing this?
- Please help me with this. I need this code example very badly, not
- just for the targa display, but for other formats as well.
-
- Thanks a zillion in advance.
-
- Tai Hou
- Singapore
-