RTF file displayed into iOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

RTF file displayed into iOS

Post by seaniepie » Mon Dec 19, 2011 6:53 pm

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

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: RTF file displayed into iOS

Post by CALL-151 » Fri Dec 23, 2011 8:19 pm

If you only need the RTF file to be viewable, this approach should work:

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

Post Reply