Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Perl: the Markov chain saw
 
PerlMonks  

(ichi) Re x 2: tk question: strick app cann't close by clicking

by ichimunki (Priest)
on Apr 25, 2002 at 14:38 UTC ( [id://162066]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: tk question: strick app cann't close by clicking
in thread tk question: strick app cann't close by clicking

Great trick. What it really does is capture the signal sent by clicking the close button and smother it. This prevents the button from working, but doesn't necessarily make it go away (it doesn't on the Windows machine I am using just now)-- which as a user-interface thing is bad. The user who tries to click the close button may actually become frustrated and close the window some other way. Or they may just think the programmer is incompetent. ;)

By the way, you can get around the bareword issue by simply quoting: "WM_DELETE_WINDOW".
  • Comment on (ichi) Re x 2: tk question: strick app cann't close by clicking

Replies are listed 'Best First'.
Re: (ichi) Re x 2: tk question: strick app cann't close by clicking
by BlueBlazerRegular (Friar) on Apr 26, 2002 at 11:26 UTC
    Thanks ichimunki, for the help on the bareword issue. And I agree with you - if you re-direct the close button, you should do something with it, rather than just ignoring the darn thing.

    Normally, I have my 'clean up' sub-routine right after the 'MainLoop', so if when they click on the close button it'll go there by default. This 'clean up' routine is also called by the 'Quit' button (or menu item).


    And on a completely different subject - I've found that when you try to plug someone's username into the reply, make sure you have their id right. Or else you get links to some interesting locations...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://162066]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.