No subject

From: ()
Date: Mon Dec 3 19:58:15 EST 2012

"
method
  (send a-top-level-window on-close) → void?

Refine this method with augment.
...
"



On May 22, 2013, at 7:14 PM, Stephen Chang wrote:

> I was about to reply with the same answer as Matthias, but with
> define/override instead of define/augment, but I kept getting an
> error. Does it say anywhere in the docs whether a method is declared
> using pubment or public? I couldnt find it.
> 
> On Wed, May 22, 2013 at 7:06 PM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>> 
>> Here we go:
>> 
>> #lang racket/gui
>> 
>> (define my-frame%
>>  (class frame%
>>    (super-new)
>>    (define/augment (on-close)
>>      (displayln "closing now"))))
>> 
>> (define frame
>>  (new my-frame% [label "on closing"][width 300][height 200]))
>> 
>> (send frame show #t)
>> 
>> 
>> 
>> On May 22, 2013, at 6:55 PM, Zelah Hutchinson wrote:
>> 
>>> From the documentation I gather that I need to augment the on-close method. I do not understand how to do this. Can someone show me a tiny example of how to perform an operation when a window is closed? Thank you.
>>> 
>>> ____________________________________________________________
>>> FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
>>> Check it out at http://www.inbox.com/marineaquarium
>>> 
>>> 
>>> 
>>> ____________________
>>> Racket Users list:
>>> http://lists.racket-lang.org/users
>> 
>> 
>> ____________________
>>  Racket Users list:
>>  http://lists.racket-lang.org/users



Posted on the users mailing list.