TC_Txed_ReadTextFromArray empties screen

I'm displaying the results of a statistical analysis in a separate window, with a text editor ATTACHED to it. If I try to get the contents of the text editor,

CALL TC_Txed_GetText (txResults, R$)

works as expected, filling R$ and leaving the contents of the text editor still displayed in its window. However,

dim p$(1)
CALL TC_Txed_ReadTextFromArray (txResults, p$)

clears the display, leaving a blank window; and I'm not able to PRINT p$ back into the text editor to re-display it.

The problem occurs in version 5.5 and 5.42 as well.

Thanks,

Bill Roberts

Comments

TXED array$

Hi Bill,

The routine:
CALL TC_Txed_ReadTextFromArray (txResults, p$)
Reads an array and puts it into the editor. In your code the array p$() is empty so that is why uou get an blank textedit area. I think what you wanted to do was extract the contents of the TextEdit control and put it into an array - in which case use:
CALL TC_Txed_WriteTextToArray (txResults, p$())
LET linemin=lbound(p$)
LET linemax=ubound(p$)
Your program will now contain an array p$ with elements running from linemin to linemax.
You can now modify the array p$ and send it back to the TextEdit control with:
CALL TC_Txed_ReadTextFromArray (txResults, p$())

Regards
Big John

apologies

Thanks for pointing out the obvious so tactfully, Big John; you are a patient man...

with apologies,

Bill

apologies

Hi Bill,

Apologies are not required. What matters is resolving the problems. Patience is required by all programmers - the black art of computer programming depends on it.

Regards
Big John