read a rtf file

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

read a rtf file

Post by jmburnod » Mon Sep 20, 2010 4:41 pm

Hi,

I tried to read a rtf file like that :

Code: Select all

   open file lePathNotesdev for read
   read from file lePathNotesdev until eof
   close file lePathNotesdev
   put the rtftext of it into fld "notes"
I have an error i believe is in "put the rtftext of it" but i don't know what

Thanks one more for your lights

Jean-Marc
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: read a rtf file

Post by Klaus » Mon Sep 20, 2010 4:49 pm

Hi Jean-Marc,

"the rtftext" is a property of a field!
So you need to:
...
set the rtftext of fld "notes" to url("file:" & lePathNotesdev)
...

Best

Klaus

P.S.
You would have found this info also in the docs (Rev dictionary) under "rtftext"! 8)

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: read a rtf file

Post by jmburnod » Mon Sep 20, 2010 5:16 pm

Hi Klaus,

You can say : "Elementary my dear JM"

And four lines less

Thank
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: read a rtf file

Post by Klaus » Mon Sep 20, 2010 5:28 pm

A votre service, monsieur :)

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: read a rtf file

Post by jmburnod » Mon Sep 20, 2010 5:40 pm

It is very confortable to know it

Best

Jean-Marc
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: read a rtf file

Post by Klaus » Mon Sep 20, 2010 6:00 pm

:)

Post Reply