Greg McIntyre wrote:
> 
> ...
> 
> What about this?
> 
> icon1 = Icon.new(...)
> icon2 = Icon.new(...)
> 
> SliderControl.new("Horizontal position") do |new_x|
>   icon1.move_to(new_x, icon.y)
>   icon2.move_to(new_x, icon.y)
> end
> 
> AFAIK, this cannot be done elegantly with a Python lambda.

Yes, that's stretching the limits of lambda.

icon1 = Icon()
icon2 = Icon()

slider = Slider("Horizontal position", lambda new_x:
                         ( icon1.move_to(new_x, icon1.y),
                         icon2.move_to(new_x, icon2.y)))

Probably better as:

def horz(new_x):
     icon1.move_to(new_x, icon1.y)
     icon2.move_to(new_x, icon2.y)

SliderControl.new("Horizontal position", horz)

  Paul Prescod