[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to select a list of trees in a ctedit and pass it to Typol ?
Hello,
Is it possible to select a list in a ctedit and to work on it ( not only its
first son ) in a Typol pgm ?
I succeed to manage the first son of the selected list as follows :
-- IN THE TYPOL PGM <typol_pgm> :
...
gettree("first_son_of_selection",_,FSS)
...
-- IN THE ENVIRONMENT LISP PROGRAM :
...
(setq first_son_of_selection ({SPEC}:make_typol_obj_sel <ctedit>))
({prolog}:send "<typol_pgm>")
...
(de {SPEC}:make_typol_obj_sel (ctedit)
(if
(typep ctedit '{ctedit})
(let ((variable (send 'variable ctedit))
(tree (car (send 'tree+
(send 'find-selection ctedit
'{current}
)
)
)
)
)
(omakeq typol-object
tree tree
variable variable
ctedit ctedit
)
)
)
)
but if I use the following {SPEC}:make_typol_obj_sel lisp function instead
of the previous one ( the car function has been removed ) :
(de {SPEC}:make_typol_obj_sel (ctedit)
(if
(typep ctedit '{ctedit})
(let ((variable (send 'variable ctedit))
(tree (send 'tree+
(send 'find-selection ctedit
'{current}
)
)
)
)
(omakeq typol-object
tree tree
variable variable
ctedit ctedit
)
)
)
)
I get an error at the exec., if I select something ( an integer or a list
of integers for inst.) :
** string : l'argument n'est pas une chaine : (int 0 number)
= ()
That does not really surprise me, but is there a way of doing that ?
Thanks in avance.
Thierry CATTEL