[Xotcl] assign proc - how to execute assign from superclass?

Krzysztof Frukacz frukacz.krzysztof at gmail.com
Wed Jan 5 15:50:54 CET 2011


Hello,

I have a question for which I haven't been able to find the answer.
I have two classes:

Class create A -slots {
	Attribute foo -proc assign {domain var value} {
		if {$var > 5} {
			error "Value cannot be bigger than 5"
		}
		$domain set $var $value
	}
}

Class create B -superclass A -slots {
	Attribute foo -proc assign {domain var value} {
		if {$var < 0} {
			error "Value cannot be less than 0"
		}
		#I don't know how to call assign for foo in class A here
	}
}

What I want to to is for assign proc from B to call assign proc from A 
too check both conditions.
Thank you for your help.

-- 
Krzysztof Frukacz


More information about the Xotcl mailing list