[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ctedit Selections
Hello Selection-Experts,
I am a bit confused about all kinds of types for pathes.
First I would like to tell what's running and than I present my problem.
I managed to display a selection during execution of a TYPOL program.
I have a rule looking like:
CALC(Arg -> Result) &
redisplay(subject, "high")
------
opa(Arg) -> opb(Result, subject);
The code for 'high' is:
(de high (path)
(let ((ctedit {SLOTOS}:lotos_ctedit)
)
({ctedit}:update-tree ctedit '{prefsel} path)
({ctedit}:scroll-to-selection ctedit '{prefsel})
({ctedit}:incremental-redisplay ctedit)
)
)
This runs fine.
My problem is that I do not want to show the selections during execution,
but later when execution has terminated
(redisplay ist just used for experiments).
That is why the 'subject' is part of the result of the above TYPOL rule.
The result of the TYPOL program is stored in another ctedit x and by clicking at
an item in the ctedit x I want to highlight the path,
stored in the selected item, in the other ctedit y.
I know that 'redisplay' performs a
$psp_to_lisp and
$psp_eval
in order to convert the TYPOL psp path to the type (Tree) used by the lisp
function 'high'.
Now:
When the result of the TYPOL program is returned to the LISP world
it is converted, including the path.
The path now has a type X different to the PSP type in TYPOL
o which i do not know
o which i do not know how to convert to the type resulting from
the transformation: type_of(subject) -> psp_to_lisp -> psp_eval -> Tree
? What conversions function do I need to apply to the part of the result
? of the TYPOL program, that contains the path (subject)?
Lets call the 'path-part' of the result of the TYPOL program "path".
Then
(pp path)
yields
1(s
2(s
| 3(e
| | 4(r
| | | 5(s
| | | | 6(s
| | | | | 7(cons
| | | | | | 8<sint 477>
| | | | | | 8<sint 27240>)
| | | | | 7<int 3>)
| | | | 6<int 1>)
| | | 5<int 1>)
| | 4<int 1>)
| 3<int 2>)
2<int 2>)
Hope anybody can flip me a hint.
Thanks in advance,
thomas