Proper way to display local html files in Desktop app


use the image tag


@brian franco

I tried that with an image stores on evernote? Where can I store these. Here’s the url I used:

Richard… you are mixing too many thing up…
What Brian posted was how to display an image on this forum within a post
The URL in you last post is NOT an image… its a webpage that CONTAINS an image

and note that alot of photo hosting websites purposely reroute their URLS to keep them from being cross posted to other sites such as this one.

So what should I use?

Here are some forum tips, there is a section to post images:


Here you go:

[quote=403115:@Richard Albrecht]@Eduardo Gutierrez de Oliveira
That is what I want. But I also want to know where to store the files and how to use a folder item to point to the file?[/quote]

If you want to add the files to your application bundle:
1.-Add a Build Step for copying files:

(remember to do it for each platform you wish to use)

2.-Add your folders and files:

3.-Load them up in code:

filesPath and pdfjsViewer are folderitems

When you compile your app the files will be copied to it and loaded from the application bundle.

If you want to select an HTML file to load you replace 1 and 2 with a GetOpenFolderItem call:

dim f as FolderItem f = GetOpenFolderItem(FileTypes1.Any) If f <> Nil Then loadPDF(f)

(the filetype was added by adding a new filetype from the add menu and by selecting it from the list of common filetypes in the add button)

Richard, if you are referring to the iOS app you’ve mentioned in other threads, be aware that String is not legit in iOS, use Text instead and the Resource folder is where you will want to store these.

@Eduardo Gutierrez de Oliveira

Thanks so much, you provided the example I could follow!

@Art Gorski

This is the Desktop version.

[quote=403294:@Richard Albrecht]@Eduardo Gutierrez de Oliveira

Thanks so much, you provided the example I could follow!

@Art Gorski

This is the Desktop version.[/quote]
It’s OK. While doing it I also figured out how to share images from dropbox (although I still think Xojo could offer to host the images and it wouldn’t be a bad thing. Being able to just drop screenshots and have them hosted locally would make it so much easier to use (and time-proof)