Polymorph: DropListMorph event handling

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Polymorph: DropListMorph event handling

Daniel Lyons
Hi again,

I want to thank everyone for your thoughtful responses to my last message.

I'm trying to make a DropListMorph using UITheme for a piece of a GUI I'm working on. I am using a ListModel, and I register an event handler with model#when:send:to:. In the event handler, I see I get the new index value as an argument to my callback, but within the callback model#selectedItem is the old value. Is there an easy way to get the new value instead of the new index, other than by looking up the value in the model#list? Or am I missing something? Is this the correct event framework? I'm under the impression there are several different event frameworks and one of them is more right than the others. Is this the ordinarily correct way to use Polymorph?

Thanks,


Daniel Lyons