AW: [Xotcl] Children object shadows parent objects method
mail at xdobry.de
mail at xdobry.de
Wed Nov 22 15:41:23 CET 2006
Hi!
It's not a bug it's a feature.
Children object can be accessed per shortcuts like methods.
my mychild childmethod par1 par2
It can be confusing about reading such code.
therefore I use by coding XOTclIDE convencion that all child objects
beginns with @
Also XOTclIDE syntax checker will understand this.
so the code will look
my @mychild childmethod par1 par2
Anyway I use often methods call like this
[my info parent] parentMethod
why not a shourtcut for it
my parent parentMethod
Artur Trzewik
>Hi,
> I just joined this list to get this help. I am seeing this behaviour.
>It is giving lot of inconvenience to me. I want to know if it is a bug
>or not -?.
> In short, if I have a children object as the same name as parent
>object's proc/instproc . The parent object's method is not getting called.
>
> Here is a sample code.
>
> Object a
> Object a proc name {} {
> return "I am valli"
> }
> a name # returns "I am valli"
> Object a::name # Child object with same name as the proc
> a name # returns ::a::name and not the previous message
>
> Is this the desired behaviour. Is there any workaround.
>
>Regards
>Vallinayagam
>valli at ezorder.in
>
>
>_______________________________________________
>Xotcl mailing list
>Xotcl at alice.wu-wien.ac.at
>http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
More information about the Xotcl
mailing list