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

AW: [Xotcl] Children object shadows parent objects method

From: <mail_at_xdobry.de>
Date: Wed, 22 Nov 2006 15:41:23 +0100

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 _at_
Also XOTclIDE syntax checker will understand this.
so the code will look

my _at_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