Rtf - formatted text question

Duane Poncy tsalagi at rainynightspress.com
Wed Jun 4 00:36:00 EDT 2003


Hello, I hope somebody can help out a newbie.

I am programming an English>Cherokee>English dictionary. Because I am 
very poor, I have to use the free edition of Revolution, so my code has 
to be tight.  Here is my problem:  I need to use character formatting 
in my definition field, but I can't figure out how to do that. 

My stack script:

on preOpen
  set the rtfText of field "tsalagiData" to URL 
"file:TsalagitoEnglishTest.rtf"
  set itemDelimiter to tab
  repeat for each line thisLine in field "TsalagiData"
    put item 1 of thisLine & linefeed after field "wordlist"   
  end repeat
end preOpen

--this puts my tab delimited rtf file into an invisible field 
"tsalagiData", then puts the first chunk (the english word) into the 
field "wordlist".  This works fine, except that importing the rtf file, 
for some reason, strips out all of my semicolons, which I need for 
formatting (see below).

My script for the field "wordlist":

on mouseDown
  put the selectedText of field "wordlist" into field "EnglishWord"
  put word 2 of clickLine() into listLine
  select line listLine of field "TsalagiData"
  set itemDelimiter to tab
  put item 2 of the selectedText of field "TsalagiData" into field 
"TsalagiDefine"
  replace ";" with return in field "TsalagiDefine"
end mouseDown

This also works fine, except when (Item 2) is put in the field 
"TsalagiDefine" the character formatting is gone. (Item 1, used above, 
doesn't need formatting.)

Is there any way to move rtf text from one field to another and retain 
the formatting?
Why are my semicolons stripped when I import my rtf file?

Thanks.


Duane Poncy

visit Elohi Gadugi: poetry, software, 
Cherokee culture and Native American rights.
http://dsaoregon.igc.org/tsalagi/

--------------------------------------------------------
Another world is not only possible, she is on her way. 
On a quiet day, I can hear her breathing.  - Arundhati Roy
---------------------------------------------------------




More information about the use-livecode mailing list