Terminology

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mtecedor
Posts: 68
Joined: Fri Sep 04, 2009 6:40 pm

Terminology

Post by mtecedor » Thu Jan 28, 2010 3:35 am

Hi All,

I am trying to do something I hope is fairly simple but I don't even know how to find the information to do it because I don't know what is called.

What I need is to provide the end user with a button that allows them to choose a word document and upload it into the application. Something that works like the "open a document" button in microsoft word.

I am assuming that it is possible to do that, but what is it called? I look several combinations (open file, upload...) but nothing applies exactly to what I want to do.

Thanks,

Marta

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

Re: Terminology

Post by Klaus » Thu Jan 28, 2010 10:06 am

Hola Marta,

sounds like
...
launch DOCUMENT (with APPLICATION)
...
is what you are looking for?


Best

Klaus

mtecedor
Posts: 68
Joined: Fri Sep 04, 2009 6:40 pm

Re: Terminology

Post by mtecedor » Fri Jan 29, 2010 12:58 am

Thanks Klaus, but I think that is not exactly what I need. If I understood corectly that will launch Microsoft Word. What I need is that when the end user select a word document (it could also be in pdf or txt format) revolution reads the content and puts it into a text field.

Is that possible?

Marta

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Terminology

Post by BvG » Fri Jan 29, 2010 1:35 am

yes it is possible, but it also is not build in, so you'd need to build it yourself, based on the many reverse engineered spec information of the doc format that you can find on the web.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Terminology

Post by bn » Fri Jan 29, 2010 2:14 pm

Marta,
I think it would be helpful if you would give a little more information of what you want. Do you want to display a Word (.doc) and PDF's in a Rev field? Than you mention txt plain text files. Do you have control over the document type or do you want to offer to import any of the various document formats into a Rev field.
The reason I ask is that it is not trivial to put pdf or doc type files into a Rev field but there are workarounds.
And if I remember correctly you are doing this on a Mac, or do you want this cross platform?
regards
Bernd

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

Re: Terminology

Post by Klaus » Fri Jan 29, 2010 2:33 pm

Hi Marta,

now I get it :)

Aside the fact that Rev cannot display DOC, PDF and more formats internally,
here is the way to go for letting the user choose a TXT file:

Code: Select all

...
answer file "Select a TXT file:" with TYPE "Text files|txt|"
## User did NOT click "Cancel" in the system open dialog
## The path to the choosen file is now in the variable IT
if it <> empty then
  put url("file:" & it) into fld "Your text field here
end if
...
On a Mac you can display a PDF file in a QuickTimeplayer object, but not on Windows!
And here is the code for the Mac:

Code: Select all

...
answer file "Select a PDF file:" with TYPE "PDF files|pdf|"
if it <> empty then
  set the filename of player "Your PDF player here" to it
end if
...
You get the picture :)
See "answer file with type" in the docs.

Best

Klaus

Curry
Posts: 111
Joined: Mon Oct 15, 2007 11:34 pm
Contact:

Re: Terminology

Post by Curry » Sat Apr 24, 2010 6:45 am

The correct terminology is "WordLib." :wink:

That's the name of an add-on I made which lets your user choose a Word or OpenOffice document, and then imports it into a Revolution field with all the formatting. It can handle the file selection for you if you wish; all you have to do is tell it which field; so it's easy to add to your project. There are sample scripts to copy and paste into buttons.

It provides really extensive support for modern Word format (Microsoft switched to the new format in 2007) but also provides basic support for legacy Word files. (And I hope to provide full support for the legacy format--the more registered users, the more features I will be able to add!)

Best of luck with your project.
Best wishes,

Curry Kenworthy

LiveCode Development, Training & Consulting
http://livecodeconsulting.com/

WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/

mtecedor
Posts: 68
Joined: Fri Sep 04, 2009 6:40 pm

Re: Terminology

Post by mtecedor » Sat May 08, 2010 11:18 pm

Thanks Curry,
WordLib helps a lot
For what I see it only works with Studio or Enterprise, so I will have to ask my professor permission to install it into the lab computers.

I will let you know :)
Marta

Curry
Posts: 111
Joined: Mon Oct 15, 2007 11:34 pm
Contact:

Re: Terminology

Post by Curry » Sun May 09, 2010 8:29 am

I'm glad to hear about that, hope it helps!
Best wishes,

Curry Kenworthy

LiveCode Development, Training & Consulting
http://livecodeconsulting.com/

WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/

karbonized
Posts: 2
Joined: Mon May 17, 2010 10:11 pm

Re: Terminology

Post by karbonized » Mon May 17, 2010 10:19 pm

So if I read this thread correctly, RunRev does not currently have the ability to load a doc or pdf and display it to the viewer? I don't even want to import it, just display it in a scrollable object like a group. These are both fairly established formats, I'm surprised they aren't supported as easily as displaying a png or jpg.

Colour me frustrated if true.

Post Reply