home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / combo.sit / Combo / card_2907.txt < prev    next >
Text File  |  1988-11-14  |  11KB  |  321 lines

  1. -- card: 2907 from stack: in
  2. -- bmap block id: 4197
  3. -- flags: 0000
  4. -- background id: 2716
  5. -- name: 
  6.  
  7.  
  8. -- part 4 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=384 top=35 right=57 bottom=484
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Combination
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   global cardid -- contains the id of the current card
  23.   global buttonid -- contains the id of the current new button
  24.   global stackname
  25.   Answer "Do you wish to make:" with "New Stack" or "Add Card" or "Add StCard"
  26.   if it = "New Stack" then
  27.     makeStack -- create the new stack and get a pointer to it, come back
  28.     ButtonToStack -- make a pointer to the new stack
  29.     pasteButton -- make a replication of the combo button
  30.   end if
  31.   if it = "Add Card" then
  32.     makeCard -- create new card in current stack
  33.     ButtonToCard -- make a pointer to the new card
  34.     pasteButton -- make a replication of the combo button
  35.   end if
  36.   if it = "Add StCard" then
  37.     makeStackCard -- create new card in last created stack, come back
  38.     ButtonToStackCard -- make a pointer to the new stack card
  39.     pasteButton -- make a replication of the combo button
  40.   end if
  41. end mouseUp
  42.  
  43. on makeStackCard
  44.   global cardid -- contains the id of the current card
  45.   global buttonid -- contains the id of the current new button
  46.   global stackname
  47.   push card
  48.   go to last card of stackname
  49.   doMenu New Card -- get a new stack for a data definition
  50.   get the id of this card -- make sure you know from where you came
  51.   put it into cardid
  52.   get the name of this stack
  53.   put it into stackname
  54.   pop card
  55. end makeStackCard
  56.  
  57. on ButtonToStackCard
  58.   global cardid -- contains the id of the current card
  59.   global buttonid -- contains the id of the current new button
  60.   global stackname
  61.   doMenu New Button
  62.   get the id of button "New Button"
  63.   put it into buttonid
  64.   set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
  65.   ask "Enter the name of the button" with "New Button"
  66.   set name of button "New Button" to it
  67. end ButtonToStackCard
  68.  
  69. on makeStack
  70.   global cardid -- contains the id of the current card
  71.   global buttonid -- contains the id of the current new button
  72.   global stackname
  73.   push card
  74.   doMenu New Stack... -- get a new stack for a data definition
  75.   get the id of this card -- make sure you know from where you came
  76.   put it into cardid
  77.   get the name of this stack
  78.   put it into stackname
  79.   pop card
  80. end makeStack
  81.  
  82. on ButtonToStack -- make a pointer to the stack
  83.   global cardid -- contains the id of the current card
  84.   global buttonid -- contains the id of the current new button
  85.   global stackname
  86.   doMenu New Button
  87.   get the id of button "New Button"
  88.   put it into buttonid
  89.   set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
  90.   ask "Enter the name of the button" with "New Button"
  91.   set name of button "New Button" to it
  92. end ButtonToStack
  93.  
  94. on makeCard
  95.   global cardid -- contains the id of the current card
  96.   global buttonid -- contains the id of the current new button
  97.   global stackname
  98.   push card
  99.   doMenu New Card -- get a new stack for a data definition
  100.   get the id of this card -- make sure you know from where you came
  101.   put it into cardid
  102.   get the name of this stack
  103.   put it into stackname
  104.   pop card
  105. end makeCard
  106.  
  107. on ButtonToCard -- make a pointer to the stack
  108.   global cardid -- contains the id of the current card
  109.   global buttonid -- contains the id of the current new button
  110.   global stackname
  111.   doMenu New Button
  112.   get the id of button "New Button"
  113.   put it into buttonid
  114.   set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
  115.   ask "Enter the name of the button" with "New Button"
  116.   set name of button "New Button" to it
  117. end ButtonToCard
  118.  
  119. on pasteButton
  120.   global cardid -- contains the id of the current card
  121.   global buttonid -- contains the id of the current new button
  122.   global stackname
  123.   if (stackname <> empty) and (cardid <> empty) then
  124.     push card
  125.     choose button tool
  126.     Click at the loc of button "Combination"
  127.     doMenu Copy Button
  128.     go to card 1 of stackname
  129.     go to cardid
  130.     doMenu Paste Button
  131.     pop card
  132.     choose browse tool
  133.   end if
  134. end pasteButton
  135.  
  136.  
  137.  
  138.  
  139. -- part 6 (button)
  140. -- low flags: 00
  141. -- high flags: 0000
  142. -- rect: left=60 top=282 right=321 bottom=102
  143. -- title width / last selected line: 0
  144. -- icon id / first selected line: 2507 / 2507
  145. -- text alignment: 1
  146. -- font id: 0
  147. -- text size: 12
  148. -- style flags: 0
  149. -- line height: 16
  150. -- part name: Help
  151. ----- HyperTalk script -----
  152. on mouseUp
  153.   show card field "Other Info"
  154. end mouseUp
  155.  
  156.  
  157. -- part 7 (field)
  158. -- low flags: 81
  159. -- high flags: 2007
  160. -- rect: left=28 top=66 right=282 bottom=478
  161. -- title width / last selected line: 0
  162. -- icon id / first selected line: 0 / 0
  163. -- text alignment: 0
  164. -- font id: 3
  165. -- text size: 12
  166. -- style flags: 0
  167. -- line height: 16
  168. -- part name: Other Info
  169. ----- HyperTalk script -----
  170. on mouseUp
  171.   hide card field "Other Info"
  172. end mouseUp
  173.  
  174.  
  175. -- part 9 (button)
  176. -- low flags: 00
  177. -- high flags: 8003
  178. -- rect: left=384 top=35 right=57 bottom=484
  179. -- title width / last selected line: 0
  180. -- icon id / first selected line: 0 / 0
  181. -- text alignment: 1
  182. -- font id: 0
  183. -- text size: 12
  184. -- style flags: 0
  185. -- line height: 16
  186. -- part name: Combination
  187. ----- HyperTalk script -----
  188. on mouseUp
  189.   global cardid -- contains the id of the current card
  190.   global buttonid -- contains the id of the current new button
  191.   global stackname
  192.   Answer "Do you wish to make:" with "New Stack" or "Add Card" or "Add StCard"
  193.   if it = "New Stack" then
  194.     makeStack -- create the new stack and get a pointer to it, come back
  195.     ButtonToStack -- make a pointer to the new stack
  196.     pasteButton -- make a replication of the combo button
  197.   end if
  198.   if it = "Add Card" then
  199.     makeCard -- create new card in current stack
  200.     ButtonToCard -- make a pointer to the new card
  201.     pasteButton -- make a replication of the combo button
  202.   end if
  203.   if it = "Add StCard" then
  204.     makeStackCard -- create new card in last created stack, come back
  205.     ButtonToStackCard -- make a pointer to the new stack card
  206.     pasteButton -- make a replication of the combo button
  207.   end if
  208. end mouseUp
  209.  
  210. on makeStackCard
  211.   global cardid -- contains the id of the current card
  212.   global buttonid -- contains the id of the current new button
  213.   global stackname
  214.   push card
  215.   go to last card of stackname
  216.   doMenu New Card -- get a new stack for a data definition
  217.   get the id of this card -- make sure you know from where you came
  218.   put it into cardid
  219.   get the name of this stack
  220.   put it into stackname
  221.   pop card
  222. end makeStackCard
  223.  
  224. on ButtonToStackCard
  225.   global cardid -- contains the id of the current card
  226.   global buttonid -- contains the id of the current new button
  227.   global stackname
  228.   doMenu New Button
  229.   get the id of button "New Button"
  230.   put it into buttonid
  231.   set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
  232.   ask "Enter the name of the button" with "New Button"
  233.   set name of button "New Button" to it
  234. end ButtonToStackCard
  235.  
  236. on makeStack
  237.   global cardid -- contains the id of the current card
  238.   global buttonid -- contains the id of the current new button
  239.   global stackname
  240.   push card
  241.   doMenu New Stack... -- get a new stack for a data definition
  242.   get the id of this card -- make sure you know from where you came
  243.   put it into cardid
  244.   get the name of this stack
  245.   put it into stackname
  246.   pop card
  247. end makeStack
  248.  
  249. on ButtonToStack -- make a pointer to the stack
  250.   global cardid -- contains the id of the current card
  251.   global buttonid -- contains the id of the current new button
  252.   global stackname
  253.   doMenu New Button
  254.   get the id of button "New Button"
  255.   put it into buttonid
  256.   set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
  257.   ask "Enter the name of the button" with "New Button"
  258.   set name of button "New Button" to it
  259. end ButtonToStack
  260.  
  261. on makeCard
  262.   global cardid -- contains the id of the current card
  263.   global buttonid -- contains the id of the current new button
  264.   global stackname
  265.   push card
  266.   doMenu New Card -- get a new stack for a data definition
  267.   get the id of this card -- make sure you know from where you came
  268.   put it into cardid
  269.   get the name of this stack
  270.   put it into stackname
  271.   pop card
  272. end makeCard
  273.  
  274. on ButtonToCard -- make a pointer to the stack
  275.   global cardid -- contains the id of the current card
  276.   global buttonid -- contains the id of the current new button
  277.   global stackname
  278.   doMenu New Button
  279.   get the id of button "New Button"
  280.   put it into buttonid
  281.   set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
  282.   ask "Enter the name of the button" with "New Button"
  283.   set name of button "New Button" to it
  284. end ButtonToCard
  285.  
  286. on pasteButton
  287.   global cardid -- contains the id of the current card
  288.   global buttonid -- contains the id of the current new button
  289.   global stackname
  290.   if (stackname <> empty) and (cardid <> empty) then
  291.     push card
  292.     choose button tool
  293.     Click at the loc of button "Combination"
  294.     doMenu Copy Button
  295.     go to card 1 of stackname
  296.     go to cardid
  297.     doMenu Paste Button
  298.     pop card
  299.     choose browse tool
  300.   end if
  301. end pasteButton
  302.  
  303.  
  304.  
  305.  
  306. -- part contents for card part 7
  307. ----- text -----
  308. In order to use the self-replicating button, you need only take the combination button and copy it to the card that you will use.  At that point do the following:
  309.  
  310.     1.  press the Combination button.
  311.  
  312.     2.  you will then be presented with a dialog box with three buttons:
  313.  
  314.         New Stack - pressing this button creates the first card in a new stack, with the background as selected on the new stack dialog, makes a button that points to it on the current card, moves the combination button to the new card, and then returns to the current card.
  315.         Add Card - pressing this button creates a new card in the current stack, behind the current card, with the current card's background, makes a button that points to it on the current card, moves the combination button to the new card, and then returns to the current card.
  316.         Add StCard - pressing this button creates a new card in the last new stack that was created, with the current card's background, makes a button that points to it on the current card, moves the combination button to the new card, and then returns to the current card.
  317.  
  318.     3.  Go to the tool menu, select the button tool, click on the new button and move it to the required location on the current card.
  319.  
  320.                        <<  click this field to remove help >>
  321.