Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Catching the Close Event

From: philb:upnaway at: 13-Jan-2003 8:03

OK got this working now .... for those interested the program is now fn-close: func [f e] [ if e/type = 'close [print e/face/data] return e ] lv-lay: layout [ button "New Window" [ lv-sub-lay: layout [vtext "a sub-window" red] lv-sub-lay/data: "Sub-window" view/new lv-sub-lay ] do [insert-event-func :fn-close] ] lv-lay/data: "Main-window" view lv-lay halt Cheers Phil p.s. My chess game is still work in progress, but I havent done any development in many months ...., just too many projects to work on and not enough hours in the day. If anyone is interested in then I can post it onto my Rebsite or the developer server. Perhaps someone can inspire me to get the program finished ... or introduce network playing. === Original Message === Hi Phil, This is abstracted from Gorim on the CompKarori rebsite. The basis for this code came from Cyphre. win1/data: "chatwindow" win2/data: "gomokuboard" f: func [f e][ if e/type = 'resize [ switch e/face/data [ "chatwindow" [ resize-window win1/size ] "gomokuboard" [ resize-window win2/size ] ] ] if e/type = 'close [ switch e/face/data [ "chatwindow" [ quit-prg ] "gomokuboard" [ close-board ] ] ] return e ] insert-event-func :f BTW, what happened to your chess program. Have you developed it any further? -- Regards, Graham Chiu