View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] Problem with slots and moving objects

From: Neil Hampton <neil.hampton_at_rostrvm.com>
Date: Mon, 27 Sep 2010 14:02:55 +0100

I am having a problem/have found a bug with slots created with an
-initcmd.
If I set a value on an object containing a slot with an initcmd and then
move it an error gets thrown every time I read the value.
 

        Class Fred -slots { Attribute a -initcmd { set _ 4 } }
        Fred x
        x a 4
        x move y
        y a
        can't read "a": invalid command name "::x"

Are there any simple work arounds for this other than having to write a
method for 'a'?

Neil Hampton
www.rostrvm.com