[racket] OS X and correct handling of events

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Dec 9 16:37:05 EST 2012

The `with-autorelease' form evaluates its body in atomic mode, while
the central event-management loop is in a different thread. You'll need
to end `with-autorelease' before the `sleep/yield', and use a second
`with-autorelease' for the final remove.

At Sun, 9 Dec 2012 22:14:19 +0100, Jens Axel Søgaard wrote:
> OS X allows programs to add a status bar item to the status bar.
> The attached program constructs such an item, attaches a small
> menu and adds it to the system bar.  Finally sleep/yield is called.
> 
> Here is what happens:
>    - the status item appears in the status bar
>    - I click the status item
>    - the time given in the sleep/yield passes
>    - the menu appears below the status item.
> 
> The desired action is that the menu appears as soon
> as the status item is clicked.
> 
> How can I get the OS X events to work together with the
> event handling of DrRacket?
> 
> --
> Jens Axel Søgaard



Posted on the users mailing list.