# What is the function of false in the Program fragment?

**URL:** <https://www.ruby-forum.com/t/what-is-the-function-of-false-in-the-program-fragment/192920>\
**Category:** Ruby-Gnome 2\
**Created:** [August 8, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/what-is-the-function-of-false-in-the-program-fragment/192920 "2010-08-08T14:20:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luofeiyu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9de0a6/32.png) [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Post date:** [August 8, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/what-is-the-function-of-false-in-the-program-fragment/192920/1 "2010-08-08T14:20:46Z")

</div>

there is a Program fragment:  
window.signal\_connect(‘delete\_event’) do  
Gtk.main\_quit  
false  
end

when i drop “false” :

window.signal\_connect(‘delete\_event’) do  
Gtk.main\_quit  
end

it can run too,what is the function of false here?

---

<div class="post-metadata">

**Author:** ![luofeiyu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9de0a6/32.png) [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Post date:** [August 8, 2010, 6:07pm UTC](https://www.ruby-forum.com/t/what-is-the-function-of-false-in-the-program-fragment/192920/2 "2010-08-08T18:07:08Z")

</div>

Hi.

If you return FALSE in the “delete\_event” signal handler,  
GTK will emit the “destroy” signal. Returning TRUE means you don’t  
want the window to be destroyed.  
This is useful for popping up ‘are you sure you want to quit?’ type  
dialogs.

–  
Vincent C.

* * *

This [SF.net](http://SF.net) email is sponsored by

Make an app they can’t live without  
Enter the BlackBerry Developer Challenge

> **[Best Open Source Mac Front-Ends 2023](https://sourceforge.net/directory/front-ends/mac/)**
>
> Compare the best free open source Mac Front-Ends at SourceForge. Free, secure and fast Mac Front-Ends downloads from the largest Open Source applications and software directory
