[Xotcl] Static member functions?

Kristoffer Lawson setok at fishpool.com
Wed Apr 16 12:11:18 CEST 2003


On Wed, 16 Apr 2003, Neophytos Demetriou wrote:

> Hi Michael (of nstcl fame right?),
>
> AFAICS, static member variables are not supported as a language
> construct but you can either have a variable in the "Chapters" class, e.g.
>
> Class Chapters
>
> Chapters set current_chapter 12345

In addition to this you can also use instvar to use a variable from
another object, like:

Class Foo
Foo set front 242

Foo instproc init {} {
  [self class] instvar front

  puts $front
}

                              / http://www.fishpool.com/~setok/




More information about the Xotcl mailing list