Page 1 of 1

using imageSource with htmlText in a field

Posted: Sun Sep 16, 2012 5:27 pm
by dave_probertGA6e24
Hi,

I'm playing with code trying to develop some simple Flashcard like stuff using html text files and external images.

I'm not really wanting to use a Browser Object as I think that might be overkill and possibly problematic, so I'm loading the html files into an array and just replacing the htmlText in a field for the next screen. It's a single card with a single field (and a next button).

The problem I'm facing is that I'd like to display the images in the field too. I have used the imageSource route before to set dynamic images for single characters in list fields - that worked great ;), but it doesn't seem to work with the htmlText field. Can anyone confirm that this is possible or not?

I'm currently putting placeholder "$" characters in the html and then using code like: set the imageSource of char n of field "the_field" to tFile
where n is the char number of the "$", and tFile is the path of the file on disk (it's correct btw)

The above makes the "$" vanish, but no picture appears :(

I hope that all makes sense - if not then I can clarify any parts that don't.
Any help would be appreciated.

Cheers,
Dave

Re: using imageSource with htmlText in a field

Posted: Sun Sep 16, 2012 5:33 pm
by Klaus
Hi Dave,

that definitively works, just tested!

Do you use the syntax with "binfile:" like in the dictionary?
...
set the imageSource of char n of field "the_field" to ("binfile:" & tFile)
...


Best

Klaus

Re: using imageSource with htmlText in a field

Posted: Sun Sep 16, 2012 5:42 pm
by dave_probertGA6e24
Hi Klaus,

You are an excellent person :)

That was precisely the problem. Added the bin part and voila - images appear!

It's late in the evening here in Thailand and I'm tired - missed the bin!

Thanks again,

Dave