Taral schrieb:
Hello,
I recently came across XOTcl and found it very very useful. I am working on optimizing some legacy compiler code which is written in TCL. I would like to make it object-oritented and so I started using XOTcl. So far I have found aouut 90% reduction in execution time. Overall I'm getting great performance by using XOTcl.
wow, this is an impressive number; good to hear that.
I would like to Thank You guys for writing such a great library.
Of course I have couple of questions for you. I will really appreciate it if you can help me here.
(1) Is there any way to all the objects or instances based on parameter value? For example, I would like to request object names of all objects where given parameter's value is equal to 5.
There is no built-in support for this. a straigthforward approach is the following which might be sufficient in many situations:
=========== # define method expr for all Objects, the operands are taken from # the instance variables Object instforward expr -objscope
# define method select with some abitrary tcl expression. All objects, # for which the expression returns 1 are returned Class instproc select {expr} { set result_list [list] foreach o [my allinstances] { if {![catch {$o expr $expr} result]} { puts "$o expr {$expr} -> $result" if {$result} { lappend result_list $o } } } return $result_list } ===========
so, now we define a view classes and objects with some instance variables
Class C -parameter {{x 10}} Class D -superclass C
C c1 C c2 -x 11 D d1 -x 100 D d2 D d3 d3 unset x
finally, we try it out with some demo queries
foreach q { {$x > 10} {$x >= 10} {$x < 1} {[string match *00* $x]} } { puts "C select $q --> {[lsort [C select $q]]}\n" }
Note that in this example, all instances of C are checked for the expression, if you use "... [Object select {$x > 10}]", all objects will be checked.
This approach might be good enough for small examples and medium speed requirements. If you have larger number of objects, and you cant restrict the query to smaller classes, you should try to build an index based on associative arrays, which could replace the "allinstances" in the code above.
(2) Do you have more example code pieces? I would like to see more sample implementation to help me with the syntax. I'm also learning TCL language at the same time using XOTcl :)
i am sure, you have seen the tutorial and the examples in xotcl*/apps and xotcl*/library. There are a few more on:
http://mini.net/tcl/XOTcl http://wiki.tcl.tk/references/10971!
(3) Is there any way to represent relationship across two classes? For example, Class A is related to Class B with one-to-many relationship.
a few class/class relations and object/class relations are maintained by xotcl (e.g. superclass, class, mixins). A start point might be ::xotcl::Relations, which is used to implement a uniform interface to mixins (and instmixins ...), which allows to specify "... mixin add ...", # "... mixin delete ...", "... mixin set ...", etc. In principle, the same interface could be used for application level relations as well...
In current applications, the classes use and maintain a list of related object/classes. Often, it is conveniant to use aggregations to express 1:1 or 1:n relationships.
(4) If there is a way to define relationship, is it possible to query objects of classes in the relationship? For example, I would like to get all the objects of Class B related to given object of Class A (like a1) across given one-to-many relationship. In this case result would be list of object handles of Class B that matches based on given primary key (identifier) value between class A and B.
a good key identifier is the object name. see the following snipplet, how such behavior could be obtained. We define class A, which maintains the relationship to some other objects. if an instances exists that relates e.g. to object c1, we could check there some properties with expr like above...
Class A -parameter {relates_to}
A a1 A a2
a1 set relates_to {c1 c2}
foreach o [A allinstances] { catch { if {[lsearch -exact [$o relates_to] c2] > -1} { puts "could check $o" } } }
hope theses examples help a little.
-gustaf
PS: when i was writing this mail i saw that the classtack information within methods called via the method "expr" is not correct. It will be fixed in the next release....
Please provide some guidance to implement above functionality using XOTcl.
Thanks a lot in advance.
May be in future I would like to contribute to XOTcl. I wish to be in touch with you guys.
Regards, Taral
On 5 Sep 2005, at 12:14, Gustaf Neumann wrote:
(3) Is there any way to represent relationship across two classes? For example, Class A is related to Class B with one-to-many relationship.
a few class/class relations and object/class relations are maintained by xotcl (e.g. superclass, class, mixins). A start point might be ::xotcl::Relations, which is used to implement a uniform interface to mixins (and instmixins ...), which allows to specify "... mixin add ...", # "... mixin delete ...", "... mixin set ...", etc. In principle, the same interface could be used for application level relations as well...
In current applications, the classes use and maintain a list of related object/classes. Often, it is conveniant to use aggregations to express 1:1 or 1:n relationships.
I was thinking about using packages to collect classes together. The problem with this is that classes are not automatically searched for in the same package. That is if Class A depends on Class B (A is B's sub-class), B needs to be read in before A is read. In Java it is enough that they are in the same package, they'll be found. With XOTcl you need to build a kind of stub file that represents the package and which then sources in all the other necessary files in the required order.
Whether this helps or not, I don't know...
Kristoffer Lawson schrieb:
I was thinking about using packages to collect classes together.
i have started some work towards turning packages into objects, where a package is an instance of a class Package. This allows in general to - query which packages are loaded in which versions - easy means to query the content and dependencies btw. packages (package-relations, could be graphically presented) - provide unloading (with destructors) of packages - allow for nested packages - since packages are instances that export stuff, it could be in pinciple possible to load multiple versions of a package simultiously, where one is not required to base everything on the same version of the package.
Although i have a few pieces for this already working, this won't make it into the next release. Andreas Kupries from active state has done some great work to make the xotcl libraries namespace clean, there is still some more work to get everything running again, and this is an important step towards the above. The namespace clean libraries are inteneded to be in the next release.
The problem with this is that classes are not automatically searched for in the same package. That is if Class A depends on Class B (A is B's sub-class), B needs to be read in before A is read. In Java it is enough that they are in the same package, they'll be found. With XOTcl you need to build a kind of stub file that represents the package and which then sources in all the other necessary files in the required order.
a few remarks to this: - what's wrong with "package req package-providing-class-B" in the package containing class A? this is the natural tcl style for such issues. - if you need more fine-grained control, xotcl provides in additon the __unknown method (which should be called actually "undefined class reference"). Zoran's ttrace package (part of the tcl thread library) uses this. see below for a short example for __unknown ...
-gustaf
----- Class proc __unknown args { # called upon unresolvable Class names; here one can use e.g. an # index to load classes from source files or from serialized # definitions set r [Class create $args] puts "... class $r created on the fly ..." return $r }
Class B -superclass A ----
On Thu, 8 Sep 2005, Gustaf Neumann wrote:
i have started some work towards turning packages into objects, where a package is an instance of a class Package. This allows in general to
OK, this sounds interesting. I think the most important for something like this is that it should be clearly stated why it is better than the normal Tcl mechanism, seeing as it would kind of compete with it (and more mechanisms isn't always best if one wants to keep the code clean).
The problem with this is that classes are not automatically searched for in the same package. That is if Class A depends on Class B (A is B's sub-class), B needs to be read in before A is read. In Java it is enough that they are in the same package, they'll be found. With XOTcl you need to build a kind of stub file that represents the package and which then sources in all the other necessary files in the required order.
a few remarks to this:
- what's wrong with "package req package-providing-class-B" in the package
containing class A?
That is two fine. I would prefer to have lots of related classes being part of the same Tcl package. For that, I have to build a stub package which then includes the rest in the appropriate order (or using some kind of sub-packaging).
So it doesn't really reflect the Java model, which is fairly straightforward.
And just for the record: I'm not a big Java advocate. In fact I think they have made serious design mistakes in many areas. Even in packages they forgot a very important part of the picture: version numbering.
Kristoffer Lawson wrote:
That is two fine. I would prefer to have lots of related classes being part of the same Tcl package. For that, I have to build a stub package which then includes the rest in the appropriate order (or using some kind of sub-packaging).
You should be able to handle this with a custom pkgIndex.tcl file. I would personally opt for the fine-grained packaging mechanism though, for more flexibility.
Cheers,
-- Neil
On Thu, 8 Sep 2005, Neil Madden wrote:
Kristoffer Lawson wrote:
That is two fine. I would prefer to have lots of related classes being part of the same Tcl package. For that, I have to build a stub package which then includes the rest in the appropriate order (or using some kind of sub-packaging).
You should be able to handle this with a custom pkgIndex.tcl file. I would personally opt for the fine-grained packaging mechanism though, for more flexibility.
Yeah, a custom pkgIndex would be a good idea too. I'm not a big fan of the fine-grained mechanism myself. I prefer to just say 'I want this package and all the classes that go with it', instead of listening all the classes I will happen to need. I know some people do that in Java too, but I just find it grows into a long mess with time.
Thanks a lot guys for your prompt response. Both, yours and Kristoffer's responses were very helpful indeed. Pretty soon I will try to write a small package to do the ORM (Object Relation Management). The examples you provided will be extremely useful in this case. Just to give you some idea, I'm thinking along this design:
Class Relationship -parameter FromClass ToClass RelationshipNumber isConditional isMultiple identifiersList
Of course, I chose descriptive names here. Specially isConditional flag is used to differentiate 1:0..1 and 1:0..n from 1:1 and 1:1..n types.
Well, I will be in touch with you guys on further development on my side.
By the way, I can not resist myself asking you guys about testing done for XOTcl. I'm planning to use it for implantable Medical Device hard-real time firmware system where bugs are not allowed at all. Reading you note about the bug in expr method, do you mind giving me a small update on what type of testing is done on this library and how much stable is it from your experience?
Are there any plans to provide more of object relation management functionality in the library itself? When are you planning the next release?
I was wondering about whom I'm talking to. You guys are obviously from Germany/Austria based on my guess from your email address. It would be nice to know you guys little more to help the communication. Do you guys have any personal webpage? I don't have one myself :( But now I feel like I should have one. So I will try to put up one sometime soon.
Thanks again, Taral
On 9/5/05, Gustaf Neumann neumann@wu-wien.ac.at wrote:
Taral schrieb:
Hello,
I recently came across XOTcl and found it very very useful. I am working on optimizing some legacy compiler code which is written in TCL. I would like to make it object-oritented and so I started using XOTcl. So far I have found aouut 90% reduction in execution time. Overall I'm getting great performance by using XOTcl.
wow, this is an impressive number; good to hear that.
I would like to Thank You guys for writing such a great library.
Of course I have couple of questions for you. I will really appreciate it if you can help me here.
(1) Is there any way to all the objects or instances based on parameter value? For example, I would like to request object names of all objects where given parameter's value is equal to 5.
There is no built-in support for this. a straigthforward approach is the following which might be sufficient in many situations:
=========== # define method expr for all Objects, the operands are taken from # the instance variables Object instforward expr -objscope
# define method select with some abitrary tcl expression. All objects, # for which the expression returns 1 are returned Class instproc select {expr} { set result_list [list] foreach o [my allinstances] { if {![catch {$o expr $expr} result]} { puts "$o expr {$expr} -> $result" if {$result} { lappend result_list $o } } } return $result_list } ===========
so, now we define a view classes and objects with some instance variables
Class C -parameter {{x 10}} Class D -superclass C
C c1 C c2 -x 11 D d1 -x 100 D d2 D d3 d3 unset x
finally, we try it out with some demo queries
foreach q { {$x > 10} {$x >= 10} {$x < 1} {[string match *00* $x]} } { puts "C select $q --> {[lsort [C select $q]]}\n" }
Note that in this example, all instances of C are checked for the expression, if you use "... [Object select {$x > 10}]", all objects will be checked.
This approach might be good enough for small examples and medium speed requirements. If you have larger number of objects, and you cant restrict the query to smaller classes, you should try to build an index based on associative arrays, which could replace the "allinstances" in the code above.
(2) Do you have more example code pieces? I would like to see more sample implementation to help me with the syntax. I'm also learning TCL language at the same time using XOTcl :)
i am sure, you have seen the tutorial and the examples in xotcl*/apps and xotcl*/library. There are a few more on:
http://mini.net/tcl/XOTcl http://wiki.tcl.tk/references/10971!
(3) Is there any way to represent relationship across two classes? For example, Class A is related to Class B with one-to-many relationship.
a few class/class relations and object/class relations are maintained by xotcl (e.g. superclass, class, mixins). A start point might be ::xotcl::Relations, which is used to implement a uniform interface to mixins (and instmixins ...), which allows to specify "... mixin add ...", # "... mixin delete ...", "... mixin set ...", etc. In principle, the same interface could be used for application level relations as well...
In current applications, the classes use and maintain a list of related object/classes. Often, it is conveniant to use aggregations to express 1:1 or 1:n relationships.
(4) If there is a way to define relationship, is it possible to query objects of classes in the relationship? For example, I would like to get all the objects of Class B related to given object of Class A (like a1) across given one-to-many relationship. In this case result would be list of object handles of Class B that matches based on given primary key (identifier) value between class A and B.
a good key identifier is the object name. see the following snipplet, how such behavior could be obtained. We define class A, which maintains the relationship to some other objects. if an instances exists that relates e.g. to object c1, we could check there some properties with expr like above...
Class A -parameter {relates_to}
A a1 A a2
a1 set relates_to {c1 c2}
foreach o [A allinstances] { catch { if {[lsearch -exact [$o relates_to] c2] > -1} { puts "could check $o" } } }
hope theses examples help a little.
-gustaf
PS: when i was writing this mail i saw that the classtack information within methods called via the method "expr" is not correct. It will be fixed in the next release....
Please provide some guidance to implement above functionality using
XOTcl.
Thanks a lot in advance.
May be in future I would like to contribute to XOTcl. I wish to be in touch with you guys.
Regards, Taral
On 7 Sep 2005, at 14:23, Taral wrote:
I was wondering about whom I'm talking to. You guys are obviously from Germany/Austria based on my guess from your email address. It would be nice to know you guys little more to help the communication. Do you guys have any personal webpage? I don't have one myself :( But now I feel like I should have one. So I will try to put up one sometime soon.
I'm not sure if you were asking me too. I myself am not a core XOTcl developer -- that's Uwe and Gustaf. However, I do have an interest in seeing it develop and particular become as stable and mature a platform as possible. I quite often find myself starting a project, thinking it so simple that I'll do it in pure Tcl. However, it almost always expands enough that I find that simply doing that "package require XOTcl" makes everything clearer. Especially now as XOTcl is included in OS X.
If you're interested, I live in Helsinki Finland and if you're ever around these parts, feel free to give us a ring and we can go out for a pint :-) (Goes for everyone else on the list too).
As for a personal webpage, my signature has it all :-)
Taral schrieb:
Well, I will be in touch with you guys on further development on my side.
good. i'll send you soon a version of xotcl with the "...foward ... expr..." problem resolved, if you are interested.
By the way, I can not resist myself asking you guys about testing done for XOTcl. I'm planning to use it for implantable Medical Device hard-real time firmware system where bugs are not allowed at all. Reading you note about the bug in expr method, do you mind giving me a small update on what type of testing is done on this library and how much stable is it from your experience?
we have a constantly growing regression test suite. in general i think it is generally perceived that xotcl has a very high stability. there is at least on company that depends on xotcl in their multi threaded mission critical product; we use xotcl in our e-learning environment, which is (based on publications) the most intensely used e-learning system on universities world wide (up to more than 4 mio requests from registered users per day). The OACS community has recentlyTIPed that xotcl should become part of every standard OACS installation.
before every release, we run all the regression test and complex systems around and we send pre-releases to core users. If you look at the changelog you will see that most bugs are either in "new features" or show up in "erroneous xotcl code". In your situation i would certainly do my own testing with my code and xotcl before burning the code into proms. The community will help you with problems, if you are interested in commercial support, we have founded recently a small company for providing support for various of our research products.
Are there any plans to provide more of object relation management functionality in the library itself? When are you planning the next release?
in the next weeks.
I was wondering about whom I'm talking to. You guys are obviously from Germany/Austria based on my guess from your email address. It would be nice to know you guys little more to help the communication. Do you guys have any personal webpage? I don't have one myself :( But now I feel like I should have one. So I will try to put up one sometime soon.
you will find my face (and uwe's) easily via google
best regards -gustaf neumann
On 9/5/05, *Gustaf Neumann* <neumann@wu-wien.ac.at mailto:neumann@wu-wien.ac.at> wrote:
Taral schrieb: > Hello, > > I recently came across XOTcl and found it very very useful. I am > working on optimizing some legacy compiler code which is written in > TCL. I would like to make it object-oritented and so I started using > XOTcl. So far I have found aouut 90% reduction in execution time. > Overall I'm getting great performance by using XOTcl. wow, this is an impressive number; good to hear that. > I would like to Thank You guys for writing such a great library. > > Of course I have couple of questions for you. I will really appreciate > it if you can help me here. > > (1) Is there any way to all the objects or instances based on > parameter value? For example, I would like to request object names of > all objects where given parameter's value is equal to 5. There is no built-in support for this. a straigthforward approach is the following which might be sufficient in many situations: =========== # define method expr for all Objects, the operands are taken from # the instance variables Object instforward expr -objscope # define method select with some abitrary tcl expression. All objects, # for which the expression returns 1 are returned Class instproc select {expr} { set result_list [list] foreach o [my allinstances] { if {![catch {$o expr $expr} result]} { puts "$o expr {$expr} -> $result" if {$result} { lappend result_list $o } } } return $result_list } =========== so, now we define a view classes and objects with some instance variables Class C -parameter {{x 10}} Class D -superclass C C c1 C c2 -x 11 D d1 -x 100 D d2 D d3 d3 unset x finally, we try it out with some demo queries foreach q { {$x > 10} {$x >= 10} {$x < 1} {[string match *00* $x]} } { puts "C select $q --> {[lsort [C select $q]]}\n" } Note that in this example, all instances of C are checked for the expression, if you use "... [Object select {$x > 10}]", all objects will be checked. This approach might be good enough for small examples and medium speed requirements. If you have larger number of objects, and you cant restrict the query to smaller classes, you should try to build an index based on associative arrays, which could replace the "allinstances" in the code above. > (2) Do you have more example code pieces? I would like to see more > sample implementation to help me with the syntax. I'm also learning > TCL language at the same time using XOTcl :) i am sure, you have seen the tutorial and the examples in xotcl*/apps and xotcl*/library. There are a few more on: http://mini.net/tcl/XOTcl http://wiki.tcl.tk/references/10971! > (3) Is there any way to represent relationship across two classes? For > example, Class A is related to Class B with one-to-many relationship. a few class/class relations and object/class relations are maintained by xotcl (e.g. superclass, class, mixins). A start point might be ::xotcl::Relations, which is used to implement a uniform interface to mixins (and instmixins ...), which allows to specify "... mixin add ...", # "... mixin delete ...", "... mixin set ...", etc. In principle, the same interface could be used for application level relations as well... In current applications, the classes use and maintain a list of related object/classes. Often, it is conveniant to use aggregations to express 1:1 or 1:n relationships. > (4) If there is a way to define relationship, is it possible to query > objects of classes in the relationship? For example, I would like to > get all the objects of Class B related to given object of Class A > (like a1) across given one-to-many relationship. In this case result > would be list of object handles of Class B that matches based on given > primary key (identifier) value between class A and B. a good key identifier is the object name. see the following snipplet, how such behavior could be obtained. We define class A, which maintains the relationship to some other objects. if an instances exists that relates e.g. to object c1, we could check there some properties with expr like above... Class A -parameter {relates_to} A a1 A a2 a1 set relates_to {c1 c2} foreach o [A allinstances] { catch { if {[lsearch -exact [$o relates_to] c2] > -1} { puts "could check $o" } } } hope theses examples help a little. -gustaf PS: when i was writing this mail i saw that the classtack information within methods called via the method "expr" is not correct. It will be fixed in the next release.... > > Please provide some guidance to implement above functionality using XOTcl. > > Thanks a lot in advance. > > May be in future I would like to contribute to XOTcl. I wish to be in > touch with you guys. > > Regards, > Taral
Hi there,
Yes, please do send me the new release as soon as you are done fixing the bug. Very glad to hear about your extensive regression testing. Yes, I will definitely do my own testing too.
Regards, Taral
On 9/8/05, Gustaf Neumann neumann@wu-wien.ac.at wrote:
Taral schrieb:
Well, I will be in touch with you guys on further development on my
side.
good. i'll send you soon a version of xotcl with the "...foward ... expr..." problem resolved, if you are interested.
By the way, I can not resist myself asking you guys about testing done
for XOTcl. I'm planning to use it for implantable Medical Device hard-real time firmware system where bugs are not allowed at all. Reading you note about the bug in expr method, do you mind giving me a small update on what type of testing is done on this library and how much stable is it from your experience?
we have a constantly growing regression test suite. in general i think it is generally perceived that xotcl has a very high stability. there is at least on company that depends on xotcl in their multi threaded mission critical product; we use xotcl in our e-learning environment, which is (based on publications) the most intensely used e-learning system on universities world wide (up to more than 4 mio requests from registered users per day). The OACS community has recentlyTIPed that xotcl should become part of every standard OACS installation.
before every release, we run all the regression test and complex systems around and we send pre-releases to core users. If you look at the changelog you will see that most bugs are either in "new features" or show up in "erroneous xotcl code". In your situation i would certainly do my own testing with my code and xotcl before burning the code into proms. The community will help you with problems, if you are interested in commercial support, we have founded recently a small company for providing support for various of our research products.
Are there any plans to provide more of object relation management functionality in the library itself? When are you planning the next release?
in the next weeks.
I was wondering about whom I'm talking to. You guys are obviously from Germany/Austria based on my guess from your email address. It would be nice to know you guys little more to help the communication. Do you guys have any personal webpage? I don't have one myself :( But now I feel like I should have one. So I will try to put up one sometime soon.
you will find my face (and uwe's) easily via google
best regards -gustaf neumann
On 9/5/05, *Gustaf Neumann* <neumann@wu-wien.ac.at mailto:neumann@wu-wien.ac.at> wrote:
Taral schrieb:
Hello,
I recently came across XOTcl and found it very very useful. I am working on optimizing some legacy compiler code which is written in TCL. I would like to make it object-oritented and so I started
using
XOTcl. So far I have found aouut 90% reduction in execution time. Overall I'm getting great performance by using XOTcl.
wow, this is an impressive number; good to hear that.
I would like to Thank You guys for writing such a great library.
Of course I have couple of questions for you. I will really
appreciate
it if you can help me here.
(1) Is there any way to all the objects or instances based on parameter value? For example, I would like to request object
names of
all objects where given parameter's value is equal to 5.
There is no built-in support for this. a straigthforward approach is the following which might be sufficient in many situations:
=========== # define method expr for all Objects, the operands are taken from # the instance variables Object instforward expr -objscope
# define method select with some abitrary tcl expression. All objects, # for which the expression returns 1 are returned Class instproc select {expr} { set result_list [list] foreach o [my allinstances] { if {![catch {$o expr $expr} result]} { puts "$o expr {$expr} -> $result" if {$result} { lappend result_list $o } } } return $result_list } ===========
so, now we define a view classes and objects with some instance variables
Class C -parameter {{x 10}} Class D -superclass C
C c1 C c2 -x 11 D d1 -x 100 D d2 D d3 d3 unset x
finally, we try it out with some demo queries
foreach q { {$x > 10} {$x >= 10} {$x < 1} {[string match *00* $x]} } { puts "C select $q --> {[lsort [C select $q]]}\n" }
Note that in this example, all instances of C are checked for the expression, if you use "... [Object select {$x > 10}]", all objects will be checked.
This approach might be good enough for small examples and medium speed requirements. If you have larger number of objects, and you cant restrict the query to smaller classes, you should try to build an index based on associative arrays, which could replace the "allinstances" in the code above.
(2) Do you have more example code pieces? I would like to see more sample implementation to help me with the syntax. I'm also learning TCL language at the same time using XOTcl :)
i am sure, you have seen the tutorial and the examples in xotcl*/apps and xotcl*/library. There are a few more on:
http://mini.net/tcl/XOTcl http://wiki.tcl.tk/references/10971!
(3) Is there any way to represent relationship across two
classes? For
example, Class A is related to Class B with one-to-many
relationship.
a few class/class relations and object/class relations are maintained by xotcl (e.g. superclass, class, mixins). A start point might be ::xotcl::Relations, which is used to implement a uniform interface to mixins (and instmixins ...), which allows to specify "... mixin add ...", # "... mixin delete ...", "... mixin set ...", etc. In principle, the same interface could be used for application level relations as well...
In current applications, the classes use and maintain a list of related object/classes. Often, it is conveniant to use aggregations to express 1:1 or 1:n relationships.
(4) If there is a way to define relationship, is it possible to
query
objects of classes in the relationship? For example, I would like to get all the objects of Class B related to given object of Class A (like a1) across given one-to-many relationship. In this case result would be list of object handles of Class B that matches based on
given
primary key (identifier) value between class A and B.
a good key identifier is the object name. see the following snipplet, how such behavior could be obtained. We define class A, which maintains the relationship to some other objects. if an instances exists that relates e.g. to object c1, we could check there some properties with expr like above...
Class A -parameter {relates_to}
A a1 A a2
a1 set relates_to {c1 c2}
foreach o [A allinstances] { catch { if {[lsearch -exact [$o relates_to] c2] > -1} { puts "could check $o" } } }
hope theses examples help a little.
-gustaf
PS: when i was writing this mail i saw that the classtack information within methods called via the method "expr" is not correct. It will be fixed in the next release....
Please provide some guidance to implement above functionality
using XOTcl.
Thanks a lot in advance.
May be in future I would like to contribute to XOTcl. I wish to
be in
touch with you guys.
Regards, Taral