Thanks, Tucker.

I did some more testing: it's actually the attribute's
setter method which is being called with a string value when I use an
inline attribute value. In case of a value set through CSS, an
instance of the new type is created on the fly and passed into the
setter.

The only question left: Why isn't it possible to test for the class
using the 'is', e.g.

if (value is lz.MyType)

for this type definition:

        class MyType {
            var _value;
            function MyType(val) {
                Debug.info('MyTpe constructor: value=', val);
                this._value = "processed value: " + val;
            }
            function convertToString() {
                return _value;
            }
        }
        lz.MyType = MyType;

I've attached the source of my small test app for anyone else interested.

Thanks, Raju

Attachment: types-css.lzx
Description: Binary data

Reply via email to