No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] two procs (-proc) for Attribute
From: Mykhaylo Sorochan <msorc_at_bigmir.net>
Date: Mon, 20 Jul 2009 13:57:23 +0300
Stefan,
I was interested in case a). I was a little wrong with the syntax and was not
able to build the statement right.
Thanks.
> # ad a)
> #
> Class create C -slots {
> Attribute create a1 -proc assign args {
> puts "[self]->[self proc] called"
> next
> } -proc get args {
> puts "[self]->[self proc] called"
> next
> }
> }
>
> C create c
> c a1 1
> c a1
>
Date: Mon, 20 Jul 2009 13:57:23 +0300
Stefan,
I was interested in case a). I was a little wrong with the syntax and was not
able to build the statement right.
Thanks.
> # ad a)
> #
> Class create C -slots {
> Attribute create a1 -proc assign args {
> puts "[self]->[self proc] called"
> next
> } -proc get args {
> puts "[self]->[self proc] called"
> next
> }
> }
>
> C create c
> c a1 1
> c a1
>