[Xotcl] Suggestion needed

Stefan Sobernig stefan.sobernig at wu.ac.at
Tue Jan 20 09:15:30 CET 2015


Hi Victor,

 > Any suggestions?

As always, there are several options. One way of nursing our custom 
Object/Class is to use proper specializations of nx::Object/nx::Class:

package req nx

namespace eval ::vitick {

   Class create Object -superclass nx::Object

   Class create Class -superclass nx::Class {
     :method init {} {
       :configure -superclasses [namespace current]::Object
     }
   }

   namespace export Object Class
}

namespace import -force ::vitick::*

This is less invasive and you have the benefit of monitoring any 
changes/additions to nx::Object/nx::Class for free.

Cheers,
Stefan


More information about the Xotcl mailing list