close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 16 years ago

Closed 13 years ago

#704 closed task (fixed)

improve tol::forallchild arguments

Reported by: Jorge Owned by: Jorge
Priority: highest Milestone: TOLBase Revitalization
Component: Interface Version: 1.1.7
Severity: critical Keywords:
Cc:

Description

tol::forallchild is command that apply a procedure to every children of a Set. The procedure is a Tcl command with prototype

proc iter_fun { args } { ... }

where args expand to the information associated to every member of the Set iterated.

This approach makes impossible to pass any external value to iter_fun and global variable should be used instead.

In order to improve code legibility iter_fun argument should be changed to a script value:

tol::forallchild "iter_fun $arg1 $arg2"

this change should mantain backward compatibility in toltcl in order to facilitate the transition.

Change History (3)

comment:1 Changed 14 years ago by Jorge

(In [3376]) refs #704, class info is shown inside a widget with syntax syntax highlight

comment:2 in reply to:  1 Changed 14 years ago by Jorge

Replying to josp:

(In [3376]) refs #704, class info is shown inside a widget with syntax syntax highlight

this comment if for ticket #740

comment:3 Changed 13 years ago by Jorge

Resolution: fixed
Status: newclosed

It has being implemented the command tol::foreach with a similar syntax as foreach in tcl.

Note: See TracTickets for help on using tickets.