[Seaside][VW] Porting 2.6a2 - WAHtmlAttributes
mlq at codedaemon.com
Sat Jan 21 16:14:45 CET 2006
I know it's been a week since you posted this, so your issue might be resolved... But I think that the example you gave is faulty...
id := (html attributes at: 'id' ifAbsent: [ 'id' -> 'default-id' ]) value
is, at least according to the Dictionary API, exactly what you'd expect... (#at:ifAbsent: evaluates the block and returns the result...)
Things would be wonky (wrt Dictionary API) if:
a> html attributes at: 'id' ifAbsent: [ 'id' -> 'default-id' ]
in any way modified the attributes (the block doesn't modify the attributes)
b> html attributes at: 'id' ifAbsentPut: [ 'default-id' ]
returned an association.
Friday, January 13, 2006, 10:20:28 AM, you wrote:
> Hi Avi,
> I find the api of WAHtmlAttributes a bit strange.
> #at: answers the value while #at:ifAbsent: and #at:ifAbsentPut: answer
> an association
> This imposes strange, difficult-to-read and error prone (imho)
> constructs like:
> id := (html attributes at: 'id' ifAbsent: ['id' ->
> 'default-id']) value.
> One would rather expect a behavior similar to Dictionary.
> Any chance to see this corrected ?
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
Marco Qualizza - (613) 895-2078
"Elegance is not optional." (Richard O'Keefe)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Seaside