revBrowser and Browser Control questions

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
daryl
Posts: 47
Joined: Mon Apr 29, 2013 11:43 pm

revBrowser and Browser Control questions

Post by daryl » Thu May 02, 2013 7:57 pm

Hi Folks,

I am writing an application that downloads documents from the web (pdf, images, etc.) and then displays them to the user.
On reading through the documentation it seems that the revBrowser interface might be the best way to go for this purpose,
but I have a few questions:

1. Can an Image Area be used to display different types of documents, i.e. Text, PDF, PNG, GIF, etc. and if so, does one need to somehow set the mime type?
2. Is there a common interface that will work with both desktops and mobile devices to display these types of documents? This application needs to work across multiple platforms.

Any help would be greatly appreciated.

Thanks,

Daryl

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

Re: revBrowser and Browser Control questions

Post by BvG » Thu May 02, 2013 8:08 pm

Image objects show various types of images. The possibilities are listed in the image object entry of the dictionary. To show text, one needs to use a field object, which can accept a subtype of html and a subtype of rtf.

There's several ways to get external images to show up on your stack. As you talked about urls, I suggest to set the fileName of the image to an url:

Code: Select all

set the fileName of image 1 to "http://this.url.does.exist.somewhere.on.the.internet.arealserver.com/and/theres/an/image.png"
If you want several images and/or several texts, then the best way is of course to have several fields and image objects on one card. You can group them, set their relative locations and width/height so they align properly.
Various teststacks and stuff:
http://bjoernke.com

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

Post Reply