Re: [AOLSERVER] tcl variables

2008-04-21 Thread Xavier Bourguignon
Andrew, if you read correctly what I wrote, I said that TO ME it was offensive, I did not make a generalised comment but merely pointed out how I personally took the comment. Don and everybody else know I have no programming experience what so ever, I wrote that I am a noob, why does he go asking

Re: [AOLSERVER] tcl variables

2008-04-21 Thread Don Baccus
On Apr 21, 2008, at 2:45 AM, Xavier Bourguignon wrote: Don and everybody else know I have no programming experience what so ever, I wrote that I am a noob, why does he go asking about my programming background for? Because, of course, I thought you meant that you were new to the

Re: [AOLSERVER] tcl variables

2008-04-21 Thread Tom Jackson
Okay Xavier, we got it. But there is no refund. Everyone here has the potential of getting pissed off while trying to help someone who isn't helping us help them. But just remember we were trying to help you. If this is your first language, then you have great potential. Most people are not

Re: [AOLSERVER] tcl variables

2008-04-21 Thread Don Baccus
On Apr 21, 2008, at 7:00 AM, Tom Jackson wrote: What is baffling is how, if you know no other languages, how you got AOLserver installed? Actually, I'm quite impressed he got as far as he did without any help ... congrats to xavier for that. Don Baccus http://donb.photo.net

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Xavier Bourguignon
So Bob, what is the difference between setting the variable within the adp and setting it in a procedure? Surely the variable set in the procedure should be available as the procedure is called within the adp. Tom, what templating system do you use? How do you use it? any links for a noob like

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Bas Scheffers
On 20/04/2008, at 7:18 PM, Xavier Bourguignon wrote: So Bob, what is the difference between setting the variable within the adp and setting it in a procedure? Surely the variable set in the procedure should be available as the procedure is called within the adp. It's all about scope! A variable

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Don Baccus
On Apr 20, 2008, at 2:48 AM, Xavier Bourguignon wrote: So Bob, what is the difference between setting the variable within the adp and setting it in a procedure? Local variables within a procedure are ... local. This is basic - what's your programming background? Surely the variable set in

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Tom Jackson
Xavier, Here is a link to the templating system, right now it is part of a larger toolkit: http://junom.com/twt/tic-tac-toe/ The README explains the basics, plus explains what files to look at for examples. Basically: .tcl files -- click and see the result of running the tcl file and then

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Tom Jackson
On Sunday 20 April 2008 04:47, Bas Scheffers wrote: More information on scope here: http://wiki.tcl.tk/11921 In general, creating variables inside a procedure and then using global or upvar/uplevel to make them available once the procedure returns is pretty bad form. It might be more exact

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Dossy Shiobara
On 2008.04.20, Xavier Bourguignon [EMAIL PROTECTED] wrote: So Bob, what is the difference between setting the variable within the adp and setting it in a procedure? Surely the variable set in the procedure should be available as the procedure is called within the adp. Xavier, I suggest you

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Xavier Bourguignon
Tom, Robert, Bas, Dossy, Thank you all for the input, all very constructive and useful, it has helped me a lot. Don, my programming background has nothing to do with the questions I asked, so sorry, you won't get an answer from me, but thank you for trying. On 20/04/2008, Dossy Shiobara [EMAIL

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Don Baccus
On Apr 20, 2008, at 11:20 AM, Xavier Bourguignon wrote: Don, my programming background has nothing to do with the questions I asked, so sorry, you won't get an answer from me, but thank you for trying. I asked because more information about your knowledge and skills can help us answer you

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Xavier Bourguignon
Hello Don, the way you asked was to me very offensive, you are right. It is so great knowing I won't get any more nasty comments from you. Thanks for putting my mind at rest concerning this issue. Yours sincerely. On 20/04/2008, Don Baccus [EMAIL PROTECTED] wrote: On Apr 20, 2008, at 11:20

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Don Baccus
On Apr 20, 2008, at 1:13 PM, Xavier Bourguignon wrote: It is so great knowing I won't get any more nasty comments from you. I wasn't trying to be nasty, and I'm sorry you took it that way, but I have to say, after my taking the time to explain why I asked about your level of programming

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Xavier Bourguignon
ooops, and another nasty comment. and apparently I am the one not being civil. On 20/04/2008, Don Baccus [EMAIL PROTECTED] wrote: On Apr 20, 2008, at 1:13 PM, Xavier Bourguignon wrote: It is so great knowing I won't get any more nasty comments from you. I wasn't trying to be nasty,

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Andrew Piskorski
Don, we all know you, but strangers don't, so, a bit more restraint on the name calling, please. Xavier, you're new here, and frankly, you're not presenting yourself in the best light. I politely suggest you reconsider your approach. Now for a few semi-gratuitous comments of my own: On Sun,

Re: [AOLSERVER] tcl variables

2008-04-20 Thread Tom Jackson
On Sunday 20 April 2008 15:48, Andrew Piskorski wrote: On Sun, Apr 20, 2008 at 07:20:58PM +0100, Xavier Bourguignon wrote: Don, my programming background has nothing to do with the questions I asked, so sorry, you won't get an answer from me, but thank you for trying. Not true, your

Re: [AOLSERVER] tcl variables

2008-04-19 Thread Tom Jackson
On Saturday 19 April 2008 12:52, Xavier Bourguignon wrote: Hi, In one of my adp files I want to display the value of a tcl variable, so I do this %=$varname% My problem is that I can only see the value when my varname is set to global in my tcl script? My question is: Why does the

Re: [AOLSERVER] tcl variables

2008-04-19 Thread Xavier Bourguignon
html head /head body %proc_call% h1%ns_adp_puts $varname%/h1 /body /html Unless varname is global in proc_call, then it seems that varname is unknown to the tcl interpreter. How do you get away with not using adps? They are the building blocks of dynamic pages aren't they?

Re: [AOLSERVER] tcl variables

2008-04-19 Thread Tom Jackson
On Saturday 19 April 2008 16:59, Xavier Bourguignon wrote: html head /head body %proc_call% h1%ns_adp_puts $varname%/h1 /body /html Unless varname is global in proc_call, then it seems that varname is unknown to the tcl interpreter. Is this a working or non-working

Re: [AOLSERVER] tcl variables

2008-04-19 Thread Robert Seeger
It might help to consider each adp page (or include'd page) as a tcl proc. As such, if you define the variable on the page, it will be visible there: html head/head % set bob 1 % body !-- the following will both work -- %= $bob % % ns_adp_puts