[Seaside-dev] Guard in file upload

Sean P. DeNigris sean at clipperadams.com
Sun Sep 5 17:44:10 UTC 2010


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?

Thanks.
Sean
-- 
View this message in context: http://forum.world.st/Guard-in-file-upload-tp2527510p2527510.html
Sent from the Seaside Development mailing list archive at Nabble.com.


More information about the seaside-dev mailing list