# On Close Application Event Action

**URL:** <https://www.ruby-forum.com/t/on-close-application-event-action/173703>\
**Category:** Ruby\
**Created:** [August 13, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/on-close-application-event-action/173703 "2009-08-13T16:03:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonsaid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Post date:** [August 13, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/on-close-application-event-action/173703/1 "2009-08-13T16:03:03Z")

</div>

Ok I am editting google sketchups base and I have built a ruby plugin  
however I want an event to happen on close.

So when you open sketchup it opens somthing called a components panel  
which I am doing with,

status = UI.show\_inspector “Components”

But then I want it to Hide the Components panel when sketchup is closed.  
any ideas anyone

---

<div class="post-metadata">

**Author:** ![simonsaid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Post date:** [August 13, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/on-close-application-event-action/173703/2 "2009-08-13T17:33:02Z")

</div>

Simon S. wrote:

> Ok I am editting google sketchups base and I have built a ruby plugin  
> however I want an event to happen on close.
> 
> So when you open sketchup it opens somthing called a components panel  
> which I am doing with,
> 
> status = UI.show\_inspector “Components”
> 
> But then I want it to Hide the Components panel when sketchup is closed.  
> any ideas anyone

no ideas?

---

<div class="post-metadata">

**Author:** ![simonsaid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Post date:** [August 13, 2009, 11:39pm UTC](https://www.ruby-forum.com/t/on-close-application-event-action/173703/3 "2009-08-13T23:39:35Z")

</div>

Simon S. wrote:

> no ideas?

I’m not sure if this does work with Google SketchUp, but doesn’t at\_exit  
do the job? The block given to it is executed just prior to the  
termination of the Ruby interpreter.

Marvin
