home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Utilities / Programming / Dialog Director 0.6 / Examples / Simple.as < prev    next >
Encoding:
Text File  |  1997-04-08  |  530 b   |  16 lines  |  [TEXT/ToyS]

  1. set dItems to [¬
  2.     {class:push button, bounds:[250, 65, 310, 85], name:"OK"}, ¬
  3.     {class:push button, bounds:[170, 65, 230, 85], name:"Cancel"}, ¬
  4.     {class:static text, bounds:[10, 10, 310, 10 + 32], contents:"A very simple dialog box.
  5. Just testing!"}]
  6.  
  7. set dlog to dd auto dialog {size:[320, 95], contents:dItems} --, timeout after:60}
  8.  
  9. if item 1 of dlog then
  10.     -- OK was pressed
  11. else if item 2 of dlog then
  12.     -- Cancel was pressed
  13. end if
  14.  
  15. set dlog to dd auto dialog {default:2, size:[320, 95], contents:dItems} --, timeout after:60}
  16.