Ho to simply modify a action line?

forum.cdk (1998-2005) & forum.td.cdk (2005-2010)
Markus S

Ho to simply modify a action line?

Post by Markus S » 08 Nov 2002, 14:27

 Posted by:  Markus S 

may anybody can help me with my problem.
The fact is I have a actionblock to parse and want to cut out some parts
like comments or replace variable with something else.
My question is now how to modify each actionline itself.
I have not found a function which fullfill my needs to simply replace
something like:

Call ...
Call x = y+z !this is a comment
! is a comment
Call ...


Call ...
Call x = y+z
Call ...

It might be very simple, however, I do not know how to change & save each
I know about InsertAfter/ InsertBefore but is there a function which only
changes the string-content of line??




Re: Ho to simply modify a action line?

Post by bm » 08 Nov 2002, 15:06

 Posted by:  bm 

Use ActionBlock.SetText.
SetText set the Text behind the first word.
The first Word is the ItemType.
So if you want change "Call ... ! Test" to "Call .." use SetText( "..." ).
If you have to change from "Call ..." to "Set n=...",
you must insert a new line and delete the old line,
because you can not change the type of a item.


Return to “td.cdk”

Who is online

Users browsing this forum: [Ccbot] and 2 guests