home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / xfcn_set.sit / Cache / card_3033.txt < prev    next >
Encoding:
Text File  |  1987-10-07  |  2.2 KB  |  91 lines

  1. -- card: 3033 from stack: in
  2. -- bmap block id: 2484
  3. -- flags: 0000
  4. -- background id: 2770
  5. -- name: 
  6. ----- HyperTalk script -----
  7. -- Get the current value of the cache when the card's opened.
  8. on openCard
  9.   send calcCache to card field Cache
  10. end openCard
  11.  
  12.  
  13. -- part 1 (field)
  14. -- low flags: 01
  15. -- high flags: 0000
  16. -- rect: left=284 top=187 right=204 bottom=319
  17. -- title width / last selected line: 0
  18. -- icon id / first selected line: 0 / 0
  19. -- text alignment: 0
  20. -- font id: 3
  21. -- text size: 12
  22. -- style flags: 256
  23. -- line height: 16
  24. -- part name: Cache
  25. ----- HyperTalk script -----
  26. -- SetCache is a XFCN external function. Given a 0 or 1 parameter
  27. -- it sets the cache on and off. With no parameters it returns
  28. -- the current setting.
  29.  
  30. - calcCache is sent from the card script on an openCard.
  31. on calcCache
  32.   put SetCache( ) into card field Cache
  33. end calcCache
  34.  
  35. on mouseUp
  36.   if card field Cache = "On" then
  37.     put "off" into newval
  38.   else
  39.     put "on" into newval
  40.   end if
  41.   put SetCache(newval) into card field Cache
  42. end mouseUp
  43.  
  44.  
  45.  
  46. -- part 2 (field)
  47. -- low flags: 01
  48. -- high flags: 0004
  49. -- rect: left=10 top=10 right=139 bottom=501
  50. -- title width / last selected line: 0
  51. -- icon id / first selected line: 0 / 0
  52. -- text alignment: 0
  53. -- font id: 3
  54. -- text size: 12
  55. -- style flags: 0
  56. -- line height: 16
  57. -- part name: 
  58.  
  59.  
  60. -- part 3 (field)
  61. -- low flags: 01
  62. -- high flags: 0004
  63. -- rect: left=12 top=243 right=328 bottom=211
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 0 / 0
  66. -- text alignment: 0
  67. -- font id: 3
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: 
  72.  
  73.  
  74. -- part contents for card part 1
  75. ----- text -----
  76. On
  77.  
  78. -- part contents for card part 2
  79. ----- text -----
  80. If you're using HyperCard as a minifinder on the Mac II, then you might find this cache control stack useful. To incorporate it in your stack, you need to copy the SetCache XFCN with ResEdit and copy the Cache card field from this stack (the script will come with it).
  81.  
  82. Have a look at the card script, too. The openCard stuff should be copied over as well. This updates the field when the card is opened.
  83.  
  84.  
  85. -- part contents for card part 3
  86. ----- text -----
  87. SetCache was perpetrated by:
  88. Dewi Williams
  89. 2227 Juniper Court
  90. Boulder CO 80302
  91. (303) 443 9038