Hello, I've been struggling with a problem for a few days now. First I thought it's something with my understanding of NX, but I think its has to do something with Naviserver. I have a global library named "oodz" in my tcl folder, insideI have some subfolders with my NX classes. I have an init.tcl file inside. According to documentation this "init.tcl" file executed first. First thing I do is looping through my subfolders and sourcing my NX Classes. It works fine as expected. Next Im creating some instances of classes I need inside "init.tcl" I made a simple example, to show: I have an NX class like that:
nx::Class create b { > :method init {} { > :say > } > > :public method say {} { > puts "Im class B" > } > } > > nx::Class create c { > :method init {} { > :say > } > > :public method say {} { > puts "Im class C" > } > } > > nx::Class create a { > :property -accessor public inBObj:object > :property -accessor public inCObj:object > > :method init {} { > set :inBObj [b new] > set :inCObj [c new] > } > > :public method myObjs {} { > puts "My B obj is: [${:inBObj} info name]" > puts "My C obj is: [${:inCObj} info name]" > } > } > In my "init.tcl" I have line: a create aObj Here's what's happenin: 1. I can see in the server log that aObj was created, I see line: Im class B, Im class C 2. If I open nsshell console, and run aObj cget: aObj cget -inBObj ::nsf::__#3 aObj cget -inCObj ::nsf::__#4 3. But when I try to run myObjs, I get an error: aObj myObjs invalid command name "::nsf::__#3" The same code works fine in tcl shell, is it related to Naviserver? Or am I doing something wrong with NX? Thank you
_______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel