1. Windows RED button (again)
- Posted by "Horvath Stefan" <horvath at acasa.ro> Feb 14, 2005
- 446 views
We have a window with an OKButton, which close window.
global integer record_no procedure onClick_WindowButtons(integer self, integer event, sequence params) record_no = -1 if self = OKButton then record_no = getItemRecordNumber() elsif self = CancelButton then record_no = -1 end if closeWindow(MyWindow) end procedure setHandler({OKButton, CancelButton}, w32HClick, routine_id("onClickWindowButtons"))
after MyWindow is closed, id need this record_no value. But if I close window with "Red button", situation change. It is possible to get error: "variable record_no has not been assigned a value" How can I assign a value to record_no after clicking "Red" CloseButton? -----Original Message----- From: George Walters [mailto:guest at RapidEuphoria.com] Sent: Thursday, February 03, 2005 12:08 AM To: EUforum at topica.com Subject: Windows RED button ============ The Euphoria Mailing List ============ posted by: George Walters <gwalters at sc.rr.com> Anyone know how to trap a click on the red kill button? --^---------------------------------------------------------------- This email was sent to: horvath at acasa.ro EASY UNSUBSCRIBE click here: http://topica.com/u/?b1dd66.b7sfan.aG9ydmF0 Or send an email to: EUforum-unsubscribe at topica.com For Topica's complete suite of email marketing solutions visit: http://www.topica.com/?p=TEXFOOTER --^---------------------------------------------------------------- _______________________________________________________________ Connex scaneaza automat toate mesajele impotriva virusilor folosind Trend Micro VirusWall. Connex automatically scans all messages for viruses using Trend Micro VirusWall. _______________________________________________________________ Nota: Este posibil ca produsul Trend Micro VirusWall sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in considerare ca exista un risc de fiecare data cind deschideti fisiere atasate si ca MobiFon nu este responsabila pentru orice prejudiciu cauzat de decizia dvs.
2. Re: Windows RED button (again)
- Posted by Mario Steele <eumario at trilake.net> Feb 14, 2005
- 446 views
George Walters wrote: > after MyWindow is closed, id need this record_no value. > But if I close window with "Red button", situation change. It is possible to > get error: "variable record_no has not been assigned a value" > How can I assign a value to record_no after clicking "Red" CloseButton? Allright, this is actually a easy one to do.
global integer record_no procedure onOpen_Window(integer id, integer event, sequence param) record_no = -1 end procedure setHandler(MyWindow,w32HOpen,routine_id("onOpen_Window")) procedure onClose_Window(integer id, integer event, sequene param) object void if record_no = -1 then void = message_box("You must select a record.","My Program",MB_ICONERROR+MB_OK) returnValue(-1) end if end procedure setHandler(MyWindow,w32HClose,routine_id("onClose_Window"))
Then you just add your handlers for the WindowButtons, and you should be set. Mario Steele
3. Re: Windows RED button (again)
- Posted by Tommy Carlier <tommy.carlier at telenet.be> Feb 14, 2005
- 451 views
global integer record_no, ok_or_cancel_clicked record_no = -1 ok_or_cancel_clicked = 0 procedure onOpenWindow(integer self, integer event, sequence params) ok_or_cancel_clicked = 0 end procedure setHandler(my_window, w32HOpen, routine_id("onOpenWindow")) procedure onButtonsClicked(integer self, integer event, sequence params) if self = OKButton then record_no = getItemRecordNumber() elsif self = CancelButton then record_no = -1 end if ok_or_cancel_clicked = 1 closeWindow(my_window) end procedure setHandler({OKButton, CancelButton}, w32HClick, routine_id("onButtonsClicked")) procedure onCloseWindow(integer self, integer event, sequence params) if ok_or_cancel_clicked then -- the window was closed by clicking OK or cancel else -- the window was closed by clicking the red X button end if end procedure setHandler(my_window, w32HClose, routine_id("onCloseWindow"))
-- The Internet combines the excitement of typing with the reliability of anonymous hearsay. tommy online: http://users.telenet.be/tommycarlier tommy.blog: http://tommycarlier.blogspot.com