[Xotcl] 'assign' method of properties not called on object initialization

Arthur Schreiber schreiber.arthur at googlemail.com
Thu Jan 26 12:06:42 CET 2012


Hi everyone,

When assigning an object's property using object parameters, the assign
method of that property does not get called. Is that a bug or intended
behaviour?

See the following code:

package require nx

nx::Class create Foo {
    :property bar {
        :public method assign { object property value } {
            puts "assign called for: $object $property $value"
        }
    }
}

set foo [Foo new]
$foo bar "test"; # assign method of the bar property is called

Foo new -bar "test"; # assign method of the bar property is _not_ called

Kind regards,
Arthur


More information about the Xotcl mailing list