[squeak-dev] Re: Testing Seaside in Squeak4.3alpha-11321

Andreas Raab andreas.raab at gmx.de
Tue Apr 19 15:26:59 UTC 2011


On 4/19/2011 17:06, Tobias Pape wrote:
> Curously, the buttons and the righ-click commands do not work,
> I suspect some OB-problems there.

Yes, definitely. It appears as if the culprit is in the combination of 
OBButtonBar>>buttonFor: aCommand which will substitute #yourself as 
action selector when the button is inactive. However, later, when the 
button should be updated we hit an optimization in 
OBButtonBar>>updateCommands which attempts to avoid the full recreation 
of the buttons and uses OBButtonBar>>updateButton:for: which does not 
update the action selector. Curiously, the latter method has my initials 
on it :-) so I'm taking a bit responsibility here. I think we should 
change OBButtonBar>>updateButton:for: to say:

updateButton: aButton for: aCommand

	^aButton
		model: aCommand;
		setBalloonText: aCommand longDescription;
		action: (aCommand isActive
				ifTrue: [ #execute ]
				ifFalse: [ #yourself ]);
		yourself

I'm not sure where to push this fix.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list