View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Suggestion needed

From: Stefan Sobernig <stefan.sobernig_at_wu.ac.at>
Date: Tue, 20 Jan 2015 09:15:30 +0100

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