[plt-scheme] extending gui.ss
The gui.ss teachpack is by far the worst software I ever designed and
released. Mea culpa. It'll go away. -- Matthias
On Dec 30, 2005, at 7:48 PM, Prabhakar Ragde wrote:
> I recently had a question from a teacher in Germany about my
> extensions to the gui.ss teachpack, which made me realize that I don't
> understand gui.ss as well as I should.
>
> Callbacks associated with MrEd objects are provided with the object
> and the event which triggered the callback; gui.ss provides just the
> event to the user-supplied callback function. HtDP readers don't know
> what to do with this and have to ignore it. I thought it might make
> sense, for a button, to provide the button to the user-supplied
> callback function. Then one function could handle multiple buttons.
>
> But a user-defined button, as far as users of gui.ss are concerned, is
> not a button% object, but a gui-item structure. So I need some way, in
> the rewritten version of gui.ss, to take a button% (provided by MrEd
> when the button is clicked) and find the corresponding gui-item so
> that I can provide it to the user-supplied callback function. I don't
> quite see how to do this. Can someone help? Many thanks. --PR
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme