From: Rene M. <rma...@bt...> - 2008-02-28 02:27:45
|
Hello. How can I pass an Object as an argument to another class constructor. Example ------ Connection.itcl ----------- ::itcl::class Connection { constructor { } public method test { } { ... } } ----------------------------------------- ---------- HelperClass.itcl --------- ::itcl::class HelperClass { ## cnx will be a Connection Object constructor { cnx } { $cnx test } } --------------------------------- -------------- MasterClass .itcl --------------------- ::itcl::class MasterClass { private variable connObj; constructor { } { Connection conn ; set connObj conn; HelperClass #auto $ connObj } } ------------------- Thanks Rene |