proc_A --> call proc_B --> call proc_A
obviously playing carefully with some status flag to avoid an endless
loop ...
Thank you in advance for your help.
Maura
According to the Tcl manual, by default the recursion limit is 1000.
Can be changed from the C level, with Tcl_SetRecursionLimit.
George
Sure, Tcl supports recursion - but it seems to me that it is not what
you're looking for...
I'd recommend to create a second callback that does the preprocessing
so that [draw_canvas] can be called safely. Then, call [draw_canvas]
from there:
proc process_parameters {} {
...
draw_canvas
}
This is the new callback for the Draw button.
Eckhard
SuchRich@KSTBWP74[/etc/frip]504:tclsh
% proc f x {puts $x; f [incr x]}
% f 1
1
...
872
873
too many nested evaluations (infinite loop?)
% interp recursionlimit {} 10000
10000
1
...
879
880
too many nested evaluations (infinite loop?)
So 500 was wrong, but on Win XP there are limits that can't be just
reconfigured.
proc_A' -> proc_B' -> proc_A0
where A' and A0 partition the old A.
George
There are two limits. One is imposed by the Tcl interpreter and can be
configured to any depth you like using [interp recursionlimit], but the
other is imposed by the Tcl core to stop the C stack from blowing up and
the app from dumping core. Raising that limit depends on twiddling OS
parameters, and not on things you can change easily from Tcl...
Donal.