an "intuitive" error message

Chris Schreiner chris.schreiner at online.no
Mon Jul 4 11:20:16 UTC 2005


So, it should read;

"Error: This block accepts 2 arguments, but was called with 1"

;-)


Frank Mueller skrev:

>Hmm, I don't see the problem.
>
>The block [ :each | ... ] accepts only one argument, named "each". But keysAndValuesDo:
>delivers two arguments. So the tight way would be
>
>Dictionary new at: 1 put: 1; keysAndValuesDo: [:key :value | ... ].
>
>Regards
>
>mue
>
>  
>
>>Lets start monday morning with an intuitive error message:
>>
>>    Dictionary new at: 1 put: 1; keysAndValuesDo: [:each | ].
>>
>>"Error: This block accepts 1 argument, but was called with 2"
>>    
>>
>
>  
>




More information about the Squeak-dev mailing list