2010/9/6 Philippe Marschall <
[hidden email]>:
> 2010/9/5 Sean P. DeNigris <
[hidden email]>:
>>
>> In Dynamic Web Development with Seaside - 10.7 File Uploads, the code has the
>> following:
>> UploadForm>>receiveFile: aFile
>> | file |
>> aFile isNil ifTrue: [ ^ nil ].
>> ...
>>
>> The explanation says:
>>
>> Note that it is possible to press the Send File button before selecting a
>> file. The #receiveFile: method guards against this by checking that file is
>> not nil.
>>
>> However, I put a halt in the block, and hit the "Send file" button, and it
>> seems this is never called:
>> aFile isNil ifTrue: [
>> self halt.
>> self inform: 'No file!'].
>>
>> Is this guard necessary?
>
> Nope you're right, it's not. WAUploadCallback >> #valueForField:
> answers nil if there's not file and WAValueCallback >>
> #evaluateWithArgument: has the nil guard.
The book and method comments are updated.
Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev