home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / hypercar / 4924 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.9 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!usc!rpi!usenet.coe.montana.edu!news.u.washington.edu!harajuku.tjp.washington.edu!jonwd
  2. From: Jon Wiederspan <jonwd@uwtc.washington.edu>
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: SuperCard and XCMD's in resource fork
  5. Date: 25 Jan 1993 16:26:07 GMT
  6. Organization: Technical Japanese Program
  7. Lines: 53
  8. Distribution: world
  9. Message-ID: <1k14avINNk6d@shelley.u.washington.edu>
  10. NNTP-Posting-Host: harajuku.tjp.washington.edu
  11. X-UserAgent: Nuntius v1.1.1d16
  12. X-XXMessage-ID: <A78952DB3901CA3F@harajuku.tjp.washington.edu>
  13. X-XXDate: Mon, 25 Jan 93 16:18:35 GMT
  14.  
  15. >Jon,
  16. >I read your note that certain xcmds had to be in the resource fork of the
  17. >supercard project to work. Could you please explain a little more .....
  18. is
  19. >there anything additional to be done. I tried putting an xcmd into the
  20. resource
  21. >fork ......... is there some other way to reference this xcmd in the
  22. script ??
  23. >Please post the answer to the hypercard news group or email me at
  24. >rbj@decoy.cc.bellcore.com
  25. >Thanks,
  26. >Ralph.
  27.  
  28. The details on this are in the Technical Notes which accompany SuperCard.
  29. TN #8: BEING RESOURCEFUL:
  30.  
  31. "Where they break --
  32.  
  33. Most of the problems that occur are in external routines that are not
  34. 'encapsulated'.  This means that they are part of a milti-resource
  35. package that expects all the resources in the group to be in the file's
  36. resource fork.  To make them operate correctly in SuperCard, it is
  37. necessary to determine which resources are referred to directly by
  38. SuperCard and make sure they exist as project resources.  The remainder
  39. must exist in the resource fork.  For example, say two XFCN's, Fun1 and
  40. Fun2, are in a project.  Fun1 is called directly in a script, but Fun2 is
  41. only called internally by Fun1 and never shows up in a script.  In this
  42. case, Fun1 must be a project resource and Fun2 must be a standard
  43. resource. "
  44.  
  45. Thus, any XFCN which is called from a script must be located in the
  46. project resources (data fork), and any that are referred to internally
  47. must be in the standard resources (resource fork).
  48.  
  49. "Language Extensions --
  50.  
  51. There is an addition to the OPEN and CLOSE commands within SuperTalk,
  52. namely OPEN RESOURCES and CLOSE RESOURCES.  This lets you put standard
  53. resources into the resource fork of a SuperCard project and have them
  54. seen by the Resource Manager.  It is crucial to understand how the
  55. Resource Manager searches files when multiple projects are opened up
  56. along with their resource forks.  For a discussion of this, please
  57. reference INSIDE MACINTOSH VOLUME I, CHAPTER 5, 'THE RESOURCE MANAGER'. 
  58. These commands should be left to the advanced users."
  59.  
  60. These commands solve the problem of an XFCN which needs both to be called
  61. from a script and to be located in a resource fork.
  62.  
  63. SuperCard has functions for moving resources between the data and
  64. resource forks, and for enumerating resources.  These are also explained
  65. in TN #8.
  66.  
  67. Jon Wiederspan
  68.