|
Hi,
I hit a problem with SimpleButtonMorph where I couldnt clear arguments. I
traced the problem to this code:
SimpleButtonMorph>>#setArguments
...
newArgs _ FillInTheBlank
request: 'Please type the arguments ..' translated
initialAnswer: s contents.
newArgs isEmpty ifFalse: [
newArgsArray _ Compiler evaluate: '{', newArgs, '}' for: self logged: false.
self arguments: newArgsArray].
...
newArgs can be empty if the user cancels the dialog or simply clears the
string. The second line assumes the first case and doesn't
affect 'arguments'. I tried the following fix:
newArgs isEmpty ifTrue: [^self].
newArgs = '.' ifTrue: [ ^self arguments: #() ].
^self arguments: (Compiler evaluate: '{', newArgs, '}' for: self logged:
false)
Is this a defect? .. Subbu
|