Page 1 of 1

RTF file displayed into iOS

Posted: Mon Dec 19, 2011 6:53 pm
by seaniepie
Hi all,
I'm trying to get iOS to display an RTF file. I test in the Livecode environment and it all works fine. When in the simulator however it doesn't show up. Heres the code:

Code: Select all

put "270" into gPlotNo -- Just so you can see the kind of data i'm pushing around
-- set up the global Data path for each environment
if environment() is "mobile" then put SpecialFolderPath ("engine") & "/Data" into gDataPath
   else put SpecialFolderPath ("Documents") & "/PlotFinder/Data" into gDataPath
-- display the text
set the RTFText of field "testField" to URL ("file:" & gDataPath & "/images/" & gPlotNo & "/" & gPlotNo & "_Details.rtf")
My images from the same folder load fine. If I change 'RTFText' to be just 'Text' then the unformatted text of the file is displayed just fine. If I use RTFText though it just comes back blank. Anyone else getting this?

Cheers
Pi

Re: RTF file displayed into iOS

Posted: Fri Dec 23, 2011 8:19 pm
by CALL-151
If you only need the RTF file to be viewable, this approach should work:

http://intkeystrokes.posterous.com/view ... ios-with-l