home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13088 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.4 KB  |  43 lines

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