thx.  Just came to the same conclusion.

On Tuesday, February 22, 2005, at 09:20  AM, John McGowan wrote:

It's a defect in the For action...

Absolutely... the counter variable should be a Method Scope, not a Request Scope. Good Luckwriting a recursive TCF method with the For Loop Action... )

I've found that if I want safe Methods that have loops in them I use the While action instead, and unfortunately, manually handle the counter as a method scoped variable.

/John

Bill Conlon wrote:

I want to use a FOR action in a TCF. [I need an action rather than a metatag so I can BREAK out of a loop on a condition.]

Anyway, the FOR action uses a request scope loop counter, but it seems to me that the loop counter MUST be in method scope in order for this TCF to not risk clobbering an identically named request scope variable elsewhere in an application.

In this case, I will pass the counter into the method as a variable, with the justification that the number of iterations is potentially useful to the caller. But it seems to me that re-usable objects must have their workings hidden. Am I missing something, or is this a defect in the witango Object model?

______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf



________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to