/sys/doc/ Documentation archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading/Writing with text widgets



Hey there,

I was wondering if there were any examples floating around 
showing/explaining how one reads from and writes to text widgets.

I understand how to write to text widgets using:
  tk->cmd(t,".text insert end {A string}");

however, the information that I wish to send to the text widget is read 
in from a text file into an array of bytes using:
  anArray : array of byte;
  someText := sys->read(fd,anArray,10);

and then tried explicitly converting this to a string with:
  stringText := string anArray;

I then added it to the the insert statement above like:
  tk->cmd(t,".text insert end "+stringText);

and got a runtime error.

I tried to print stringText with a sys->printf but to no avail.

Thanks,
Chad.
_____________________________________________________________________________
cckeith@umr.edu	      |	...the world must be peopled.  When I said I 
Computer Science      |	would die a bachelor, I did not think I should
		      |	live till I were married.- Shakespeare
-----------------------------------------------------------------------------
WWW Homepage : http://www.umr.edu/~cckeith
_____________________________________________________________________________