W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

Re: Request For Feedback: Traits

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 04 Jan 2006 15:30:13 +0100
To: <doug.schepers@vectoreal.com>
Cc: www-svg@w3.org
Message-ID: <81mnr1p71cl4mn1dv60uti9tsk3t5k2s8c@hive.bjoern.hoehrmann.de>

* Doug Schepers wrote:
>Cameron McCormack wrote:
>|
>| I think it is useful, since I see many scripts (including some of my
>| own, when I can't be bothered) that do something like:
>| 
>|   var x = Number(rect.getAttributeNS(null, "x"));
>| 
>| ignoring the fact that units may have been used.
>
>Yes, that's another useful aspect. Thanks.

Note that TraitAccess does not offer a way to rewrite the code above,
getFloatTrait would throw an exception and getTrait cannot be used at
all for 'x' attributes. rect.x.baseVal.value and rect.x.baseVal.value
InSpecifiedUnits handle this and can be changed without calling any
setFoo methods.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 4 January 2006 14:29:47 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT