On 2003.08.19, Nikolay Skachkov <[EMAIL PROTECTED]> wrote: > Sorry that I am a little bit new in tcl/adp.
Today is as good a day as any to start learning. ;-) > My problem is that I have a code (rather old, authors are not already > seen around) that has many ns_include statements. All have -sameframe > option. Inside the include files I see a nice mix of ns_adp_argv access > to explicitly passed parameters plus free usage of variables from call > context, due to -sameframe set. As you say you solution will not work > with ns_adp_argv (and I understand why). > > Please give me some education on the following issue too: > > In the code discussed I see both ns_share and global used (in acddition > to ns_include with parameters) to pass data to everywhere. > > I have read documentation, but unfortunatly my understanding of > difference between global and ns_share did not improve with that reading. Good lord. I suggest you seek clerical help and perform an exorcism then destroy that code so that no poor soul has to ever be exposed to it again. On a more serious note, I strongly urge you to consider a clean rewrite. That code you've got is (obviously) unmaintainable and will only lead to more pain and suffering. To answer your other question, ns_share (which is deprecated now) shares variables across all Tcl interps. global just means you're referring to the global scope in the current interp. I'd seek to first eliminate all calls to ns_adp_include that use the -sameframe arg, fixing up any variable references by passing them explicitly in the ns_adp_include and grabbing them with ns_adp_argv on the other side. OR, if those vars are used everywhere, then share them using NSV's. -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
