PluggableButtonMorph selector with Argument?

Bijan Parsia bparsia at email.unc.edu
Thu Feb 14 16:02:50 UTC 2002


On Thu, 14 Feb 2002, Bijan Parsia wrote:
[snip]
> Seems to me that all the Pluggable classes expect you to wrap up their
> actions into a unary selector, perhaps by building a special model if
> needed.

Oh man, that's so wrong :) What the PluggableList, etc. classes do is
expect specific "styles" of selector for each of their pluggable
types. So, the getMenu: selector needs to take an argument (and, indeed,
it should expect a menu argument).

> Modifying them to (optionally) take arguments seems not too tricky
> (check out performAction; basically add an arguments ivar and lazily fill
> it with an empty array).

Eh, forget that in the general case, since the "plug" slots are *very*
specific. It would suck to have to accomodate all sorts of weird stuff.

OTOH, the buttons could be reasonably generalized along these lines.

Cheers,
Bijan Parsia.




More information about the Squeak-dev mailing list