Re: HTML Text and Images

2010-10-06 Thread Ken Ray
 On Tue, Oct 5, 2010 at 7:32 PM, Ray Horsley r...@linkit.com wrote:
 
  If
 worse comes to worse I can always just keep the image I create to get the
 dimensions, resize it and use it instead.
 
 
 I think this is the only way.
 
 If you'd go with RevBrowser you could set image attribute such as height and
 width in the img tag but HTMLText does not work like that. Heck, I wish it
 was not called HTMLText but SGMLText or something like FancyTaggedText

Actually you can do it this way:

1) Retrieve the image from the web into an image object.
2) Change the size of the image object itself, making sure to keep the
dimensions consistent so you don't get stretching/skewing.
3) Lock the image object (set the lockLoc of image to true)
4) In your field, instead of setting the htmlText to the image with the ID
of the image object in img src.

Here's a simple example (I had to add a couple of returns before the text so
you could see the bird - watch linewraps):

on mouseUp
  set the lockLoc of img testImage to false
  set the filename of img testImage to 
  set the filename of image testImage to
http://linkit.com/Schools/ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%2
0Bank/04%20ELA%20QTI%20with%20GUIDs/Grade%20KLanguage%20Arts-95/images/38228
.jpg
  set the width of img testimage to (the width of img testimage/4)
  set the height of img testimage to (the height of img testimage/4)
  set the lockLoc of img testImage to true
  set the htmlText of fld 1 to (PPPHere's the bird img src=  quote
 (the id of img testImage)  quote  )
end mouseUp

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text and Images

2010-10-05 Thread BNig

Ray,

create an image object, call it testimage (could be hidden)
on mouseUp
   set the filename of image testImage to
http://linkit.com/Schools/ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/04%20ELA%20QTI%20with%20GUIDs/Grade%20KLanguage%20Arts-95/images/38228.jpg;
   put the width of image testImage  the height of image testImage
end mouseUp
regards
Bernd
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/HTML-Text-and-Images-tp2956597p295.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: HTML Text and Images

2010-10-05 Thread Ray Horsley
Now honestly, why didn't I think of that?  I'll give it a try.

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of BNig
Sent: Tuesday, October 05, 2010 2:50 PM
To: use-revolution@lists.runrev.com
Subject: Re: HTML Text and Images


Ray,

create an image object, call it testimage (could be hidden) on mouseUp
   set the filename of image testImage to
http://linkit.com/Schools/ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%2
0Bank/04%20ELA%20QTI%20with%20GUIDs/Grade%20KLanguage%20Arts-95/images/38228
.jpg
   put the width of image testImage  the height of image testImage
end mouseUp
regards
Bernd
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/HTML-Text-and-Images-tp295659
7p295.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: HTML Text and Images

2010-10-05 Thread Ray Horsley
Bernd,

Works like a charm!  Now, any suggestions on how to resize the image which
is showing up when setting the htmlText of a field?  This is a tough one, I
know, and I don't think there is a way to do this.  I just thought I'd throw
it out there to see if anybody has any suggestions.

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of BNig
Sent: Tuesday, October 05, 2010 2:50 PM
To: use-revolution@lists.runrev.com
Subject: Re: HTML Text and Images


Ray,

create an image object, call it testimage (could be hidden) on mouseUp
   set the filename of image testImage to
http://linkit.com/Schools/ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%2
0Bank/04%20ELA%20QTI%20with%20GUIDs/Grade%20KLanguage%20Arts-95/images/38228
.jpg
   put the width of image testImage  the height of image testImage
end mouseUp
regards
Bernd
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/HTML-Text-and-Images-tp295659
7p295.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text and Images

2010-10-05 Thread Andre Garzia
On Tue, Oct 5, 2010 at 3:15 PM, Ray Horsley r...@linkit.com wrote:

 Many thanks to Andre Garzia for help on this.  I'm still faced with some
 [possibly new] issues regarding setting the htmlText of a fld.  What I need
 is the height and width of images inside the htmlText.  Ideally I'd like to
 manipulate height and width.  I'm not downloading any images as files and
 I'm not using the binFile format so I don't believe they're residing
 anywhere on my local disk.

 Here's a typical span tag as an example:

 spanimg
 src=
 http://linkit.com/Schools/ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Fu

 ll%20Bank/04%20ELA%20QTI%20with%20GUIDs/Grade%20KLanguage%20Arts-95/images/3
 8228.jpg/span

 Set the htmlText of any field to this string and you get a pretty little
 bird, but how tall and how wide is that bird?


Ray,

I think you're on the verge of using the wrong tool for the job. I think
your needs might be better served by RevBrowser than the HTMLText property
of the fields.

First of all, that span tag will be worthless in the htmltext, it will just
be ignored. Other thing is that HTMLText is not HTML and thus does not
possess the necessary stuff under the hood to make things like image
manipulation or introspection possible. I don't think you can check how wide
or how tall an image is inside a field if the imagesource is set to a remote
location.

If you'd use a revBrowser window, it might be possible to check that data
with javascript.

If you just use the HTMLText thing, I don't think it is possible but I am
not an expert, someone here might know better. I think you might need to:

  *  Rethink if HTMLText is what you should be using and maybe consider
moving to a better hypertext container such as revbrowser (which is not a
field and thus not really editable)
  *  If you stay with HTMLText, then, you might need an auxiliary routine to
parse the HTMLText property to pick all the images from the remote location,
download them, manipulate them as needed and then use them in the HTMLText
thing.

Andre





 Thanks,

 Ray Horsley
 LinkIt! Software




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: HTML Text and Images

2010-10-05 Thread Ray Horsley
Andre,

Thanks again for your input here.  Jim Ault's suggestion is working well;
that I create an image, set its filename to the image's URL to get the
image's height and width and then delete the image.  The only thing I'm
really unable to do now is resize images.  I'm not sure how I would do that
going the browser route so I might just stick with the htmlText route.  If
worse comes to worse I can always just keep the image I create to get the
dimensions, resize it and use it instead.

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre Garzia
Sent: Tuesday, October 05, 2010 3:23 PM
To: How to use Revolution
Subject: Re: HTML Text and Images

On Tue, Oct 5, 2010 at 3:15 PM, Ray Horsley r...@linkit.com wrote:

 Many thanks to Andre Garzia for help on this.  I'm still faced with 
 some [possibly new] issues regarding setting the htmlText of a fld.  
 What I need is the height and width of images inside the htmlText.  
 Ideally I'd like to manipulate height and width.  I'm not downloading 
 any images as files and I'm not using the binFile format so I don't 
 believe they're residing anywhere on my local disk.

 Here's a typical span tag as an example:

 spanimg
 src=
 http://linkit.com/Schools/ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20F
 u

 ll%20Bank/04%20ELA%20QTI%20with%20GUIDs/Grade%20KLanguage%20Arts-95/im
 ages/3
 8228.jpg/span

 Set the htmlText of any field to this string and you get a pretty 
 little bird, but how tall and how wide is that bird?


Ray,

I think you're on the verge of using the wrong tool for the job. I think
your needs might be better served by RevBrowser than the HTMLText property
of the fields.

First of all, that span tag will be worthless in the htmltext, it will just
be ignored. Other thing is that HTMLText is not HTML and thus does not
possess the necessary stuff under the hood to make things like image
manipulation or introspection possible. I don't think you can check how wide
or how tall an image is inside a field if the imagesource is set to a remote
location.

If you'd use a revBrowser window, it might be possible to check that data
with javascript.

If you just use the HTMLText thing, I don't think it is possible but I am
not an expert, someone here might know better. I think you might need to:

  *  Rethink if HTMLText is what you should be using and maybe consider
moving to a better hypertext container such as revbrowser (which is not a
field and thus not really editable)
  *  If you stay with HTMLText, then, you might need an auxiliary routine to
parse the HTMLText property to pick all the images from the remote location,
download them, manipulate them as needed and then use them in the HTMLText
thing.

Andre





 Thanks,

 Ray Horsley
 LinkIt! Software




--
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text and Images

2010-10-05 Thread Andre Garzia
On Tue, Oct 5, 2010 at 7:32 PM, Ray Horsley r...@linkit.com wrote:

  If
 worse comes to worse I can always just keep the image I create to get the
 dimensions, resize it and use it instead.


I think this is the only way.

If you'd go with RevBrowser you could set image attribute such as height and
width in the img tag but HTMLText does not work like that. Heck, I wish it
was not called HTMLText but SGMLText or something like FancyTaggedText



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-10-01 Thread Andre Garzia
Hello there Ray,

How do you set the image? Is it an ID reference like:

image src=1091

Or you're setting it to a file name?

On Fri, Oct 1, 2010 at 10:37 AM, Ray Horsley r...@linkit.com wrote:

 Greetings,

 Anybody know where images get cached when I set the htmlText of a field to
 html which contains image references?

 Images come through fine on my machine in development mode (LiveCode 4.5)
 but they don't in a standalone on somebody else's running Windows Vista or
 7, that is, until the user right-clicks the standalone and chooses Run as
 Administrator.  After they've done that once, however, they can
 double-click the standalone later to open it normally, the standalone then
 sets the htmlText of the field to the same html, and the images display
 fine.  This leads me to believe setting the htmlText of a field caches
 images somewhere.  Ultimately, of course, I'd like get a solution for these
 other than telling all our users they have to right-click the standalone
 and
 choose Run as Administrator to see images when setting the htmlText of a
 field.

 Greatly appreciate any input here!

 Thanks,

 Ray Horsley
 LinkIt! Software

 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: HTML Text

2010-10-01 Thread Ray Horsley
Andre,

It's a file path.  Here's an example of a test's 'question' tag, url
encoded, with several img attributes inside of a span element:

Questionlt;span class=class1
xmlns=http://www.imsglobal.org/xsd/imsqti_v2p0gt;lt;bgt;A baby giraffe
is lt;img
src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06%20Math%20QTI%
20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/mml2504101.png
/gt; feet tall, and an adult giraffe is lt;img
src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06%20Math%20QTI%
20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/mml2504102.png
/gt;lt;img
src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06%20Math%20QTI%
20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/mml2504103.png
/gt; feet tall. How much taller is the adult giraffe than the baby
giraffe?lt;/bgt;lt;/spangt;/Question

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre Garzia
Sent: Friday, October 01, 2010 10:37 AM
To: How to use Revolution
Subject: Re: HTML Text

Hello there Ray,

How do you set the image? Is it an ID reference like:

image src=1091

Or you're setting it to a file name?

On Fri, Oct 1, 2010 at 10:37 AM, Ray Horsley r...@linkit.com wrote:

 Greetings,

 Anybody know where images get cached when I set the htmlText of a 
 field to html which contains image references?

 Images come through fine on my machine in development mode (LiveCode 
 4.5) but they don't in a standalone on somebody else's running Windows 
 Vista or 7, that is, until the user right-clicks the standalone and 
 chooses Run as Administrator.  After they've done that once, 
 however, they can double-click the standalone later to open it 
 normally, the standalone then sets the htmlText of the field to the 
 same html, and the images display fine.  This leads me to believe 
 setting the htmlText of a field caches images somewhere.  Ultimately, 
 of course, I'd like get a solution for these other than telling all 
 our users they have to right-click the standalone and choose Run as 
 Administrator to see images when setting the htmlText of a field.

 Greatly appreciate any input here!

 Thanks,

 Ray Horsley
 LinkIt! Software

 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




--
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-10-01 Thread Jeff Massung
On Fri, Oct 1, 2010 at 9:37 AM, Andre Garzia an...@andregarzia.com wrote:

 Hello there Ray,

 How do you set the image? Is it an ID reference like:

 image src=1091


Holy crap does that work? I was doing it the hard way. And don't ask me what
that was, cause I'll feel really stupid if I post it. ;-)

Jeff M.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-10-01 Thread Dar Scott
This requires Internet access.  Perhaps this is a matter of telling 7  
that this program can access the Internet.


Dar


On Oct 1, 2010, at 9:00 AM, Ray Horsley wrote:


Andre,

It's a file path.  Here's an example of a test's 'question' tag, url
encoded, with several img attributes inside of a span element:

Questionlt;span class=class1
xmlns=http://www.imsglobal.org/xsd/imsqti_v2p0gt;lt;bgt;A baby  
giraffe

is lt;img
src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06% 
20Math%20QTI%
20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/ 
mml2504101.png

/gt; feet tall, and an adult giraffe is lt;img
src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06% 
20Math%20QTI%
20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/ 
mml2504102.png

/gt;lt;img
src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06% 
20Math%20QTI%
20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/ 
mml2504103.png

/gt; feet tall. How much taller is the adult giraffe than the baby
giraffe?lt;/bgt;lt;/spangt;/Question

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre  
Garzia

Sent: Friday, October 01, 2010 10:37 AM
To: How to use Revolution
Subject: Re: HTML Text

Hello there Ray,

How do you set the image? Is it an ID reference like:

image src=1091

Or you're setting it to a file name?

On Fri, Oct 1, 2010 at 10:37 AM, Ray Horsley r...@linkit.com wrote:


Greetings,

Anybody know where images get cached when I set the htmlText of a
field to html which contains image references?

Images come through fine on my machine in development mode (LiveCode
4.5) but they don't in a standalone on somebody else's running  
Windows

Vista or 7, that is, until the user right-clicks the standalone and
chooses Run as Administrator.  After they've done that once,
however, they can double-click the standalone later to open it
normally, the standalone then sets the htmlText of the field to the
same html, and the images display fine.  This leads me to believe
setting the htmlText of a field caches images somewhere.  Ultimately,
of course, I'd like get a solution for these other than telling all
our users they have to right-click the standalone and choose Run as
Administrator to see images when setting the htmlText of a field.

Greatly appreciate any input here!

Thanks,

Ray Horsley
LinkIt! Software

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





--
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription

preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-10-01 Thread Andre Garzia
On Fri, Oct 1, 2010 at 12:34 PM, Jeff Massung mass...@gmail.com wrote:

 On Fri, Oct 1, 2010 at 9:37 AM, Andre Garzia an...@andregarzia.com
 wrote:

  Hello there Ray,
 
  How do you set the image? Is it an ID reference like:
 
  image src=1091
 
 
 Holy crap does that work? I was doing it the hard way. And don't ask me
 what
 that was, cause I'll feel really stupid if I post it. ;-)


Basically the src attribute of the img node is used as the value for the
imagesource property. The imagesource property can be a value like image ID,
image Name, image URL or empty.

If using an image URL which is what Ray is using, one thing to keep in mind
is the defaultfolder. He uses a relative folder in the assignment, if the
application run as an administrator or as a common user has a different
defaultfolder, then the relative path will break.

HTMLText: http://docs.runrev.com/Property/HTMLText

ImageSource: http://docs.runrev.com/Property/imageSource




 Jeff M.
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-10-01 Thread Andre Garzia
On Fri, Oct 1, 2010 at 12:40 PM, Dar Scott d...@swcp.com wrote:

 This requires Internet access.  Perhaps this is a matter of telling 7 that
 this program can access the Internet.


Dar,

I think it uses a relative path which is not an URL, are you sure it
requires net access?

Ray,

Your span tags and xmlns stuff will be removed and ignored by the HTMLText
property. HTMLText is not HTML, repeat, HTMLText is not HTML. Check out the
docs to see what subset of HTML is supported on HTMLText


 Dar



 On Oct 1, 2010, at 9:00 AM, Ray Horsley wrote:

  Andre,

 It's a file path.  Here's an example of a test's 'question' tag, url
 encoded, with several img attributes inside of a span element:

 Questionlt;span class=class1
 xmlns=http://www.imsglobal.org/xsd/imsqti_v2p0gt;lt;bgt;A baby
 giraffe
 is lt;img

 src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06%20Math%20QTI%

 20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/mml2504101.png
 /gt; feet tall, and an adult giraffe is lt;img

 src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06%20Math%20QTI%

 20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/mml2504102.png
 /gt;lt;img

 src=ETS%20Items/ETS%20Item%20Bank/ETS10Q1/01%20Full%20Bank/06%20Math%20QTI%

 20with%20GUIDs%20and%2096dpi%20PNG/Grade%2006Math-49/images/mml2504103.png
 /gt; feet tall. How much taller is the adult giraffe than the baby
 giraffe?lt;/bgt;lt;/spangt;/Question

 Thanks,

 Ray

 -Original Message-
 From: use-revolution-boun...@lists.runrev.com
 [mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre
 Garzia
 Sent: Friday, October 01, 2010 10:37 AM
 To: How to use Revolution
 Subject: Re: HTML Text

 Hello there Ray,

 How do you set the image? Is it an ID reference like:

 image src=1091

 Or you're setting it to a file name?

 On Fri, Oct 1, 2010 at 10:37 AM, Ray Horsley r...@linkit.com wrote:

  Greetings,

 Anybody know where images get cached when I set the htmlText of a
 field to html which contains image references?

 Images come through fine on my machine in development mode (LiveCode
 4.5) but they don't in a standalone on somebody else's running Windows
 Vista or 7, that is, until the user right-clicks the standalone and
 chooses Run as Administrator.  After they've done that once,
 however, they can double-click the standalone later to open it
 normally, the standalone then sets the htmlText of the field to the
 same html, and the images display fine.  This leads me to believe
 setting the htmlText of a field caches images somewhere.  Ultimately,
 of course, I'd like get a solution for these other than telling all
 our users they have to right-click the standalone and choose Run as
 Administrator to see images when setting the htmlText of a field.

 Greatly appreciate any input here!

 Thanks,

 Ray Horsley
 LinkIt! Software

 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




 --
 http://www.andregarzia.com All We Do Is Code.
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution


 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: HTML Text

2010-10-01 Thread Ray Horsley
Ah -  Very interesting regarding the defaultFolder.  The defaultFolder when
I open LiveCode on my machine is:

   C:/Windows/system32

I didn't realize I was doing anything with the defaultFolder when issuing
the command:

   set the htmlText of fld 1 to myHtml

Should I set this beforehand to a known folder the user can write to?

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre Garzia
Sent: Friday, October 01, 2010 11:43 AM
To: How to use Revolution
Subject: Re: HTML Text

On Fri, Oct 1, 2010 at 12:34 PM, Jeff Massung mass...@gmail.com wrote:

 On Fri, Oct 1, 2010 at 9:37 AM, Andre Garzia an...@andregarzia.com
 wrote:

  Hello there Ray,
 
  How do you set the image? Is it an ID reference like:
 
  image src=1091
 
 
 Holy crap does that work? I was doing it the hard way. And don't ask 
 me what that was, cause I'll feel really stupid if I post it. ;-)


Basically the src attribute of the img node is used as the value for the
imagesource property. The imagesource property can be a value like image ID,
image Name, image URL or empty.

If using an image URL which is what Ray is using, one thing to keep in mind
is the defaultfolder. He uses a relative folder in the assignment, if the
application run as an administrator or as a common user has a different
defaultfolder, then the relative path will break.

HTMLText: http://docs.runrev.com/Property/HTMLText

ImageSource: http://docs.runrev.com/Property/imageSource




 Jeff M.
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-10-01 Thread Andre Garzia
On Fri, Oct 1, 2010 at 12:52 PM, Ray Horsley r...@linkit.com wrote:

 Ah -  Very interesting regarding the defaultFolder.  The defaultFolder when
 I open LiveCode on my machine is:

   C:/Windows/system32

 I didn't realize I was doing anything with the defaultFolder when issuing
 the command:

   set the htmlText of fld 1 to myHtml

 Should I set this beforehand to a known folder the user can write to?


Ray,

You need to set it to some place where the compound assembly of the
defaultfolder + your imagesource value actually resolves to a real file.

So if you have the following imagesource set:

ETS Items/ETS Item Bank/ETS10Q1/01 Full Bank/06 Math QTI 0with GUIDs and
96dpi PNG/Grade 06Math-49/images/mml2504101.png

And that ETS Items is located at ~/Desktop/Rays App/ so that the actuall
file path is:

~/Desktop/Rays App/ETS Items/ETS Item Bank/ETS10Q1/01 Full Bank/06 Math QTI
0with GUIDs and 96dpi PNG/Grade 06Math-49/images/mml2504101.png

Then you just need to set the defaultfolder to ~/Desktop/Rays App/

Image source has three possible resolutions:

(1) The image is inside revolution since imagesource value is an ID or image
name. Just figure out what image is and use it
(2) The image is a remote resource since we're given an fully qualified URL.
Load it from the server
(3) Image is a file on disk, see if it is a full path or relative path to
our defaultfolder and solve it.

I actually think that cases (2) and (3) are actually the same. I don't know
if you can simply pass a path without the binfile protocol in it.

Try changing your source to something like:

binfile:ETS Items/ETS Item Bank/ETS10Q1/01 Full Bank/06 Math QTI 0with GUIDs
and 96dpi PNG/Grade 06Math-49/images/mml2504101.png

Remember the relative folder, if possible, always use full paths by figuring
out the path before assembling the HTMLText chunk and replacing the
variables.





 Thanks,

 Ray

 -Original Message-
 From: use-revolution-boun...@lists.runrev.com
 [mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre Garzia
 Sent: Friday, October 01, 2010 11:43 AM
 To: How to use Revolution
 Subject: Re: HTML Text

 On Fri, Oct 1, 2010 at 12:34 PM, Jeff Massung mass...@gmail.com wrote:

  On Fri, Oct 1, 2010 at 9:37 AM, Andre Garzia an...@andregarzia.com
  wrote:
 
   Hello there Ray,
  
   How do you set the image? Is it an ID reference like:
  
   image src=1091
  
  
  Holy crap does that work? I was doing it the hard way. And don't ask
  me what that was, cause I'll feel really stupid if I post it. ;-)
 

 Basically the src attribute of the img node is used as the value for the
 imagesource property. The imagesource property can be a value like image
 ID,
 image Name, image URL or empty.

 If using an image URL which is what Ray is using, one thing to keep in mind
 is the defaultfolder. He uses a relative folder in the assignment, if the
 application run as an administrator or as a common user has a different
 defaultfolder, then the relative path will break.

 HTMLText: http://docs.runrev.com/Property/HTMLText

 ImageSource: http://docs.runrev.com/Property/imageSource



 
  Jeff M.
  ___
  use-revolution mailing list
  use-revolution@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-revolution
 



 --
 http://www.andregarzia.com All We Do Is Code.
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: HTML Text

2010-10-01 Thread Ray Horsley
Andre,

This is really quite helpful.  Thanks for your time on this!  I'll study
this further and do some experimenting and let you know how it goes.

Thanks,

Ray

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre Garzia
Sent: Friday, October 01, 2010 12:01 PM
To: How to use Revolution
Subject: Re: HTML Text

On Fri, Oct 1, 2010 at 12:52 PM, Ray Horsley r...@linkit.com wrote:

 Ah -  Very interesting regarding the defaultFolder.  The defaultFolder 
 when I open LiveCode on my machine is:

   C:/Windows/system32

 I didn't realize I was doing anything with the defaultFolder when 
 issuing the command:

   set the htmlText of fld 1 to myHtml

 Should I set this beforehand to a known folder the user can write to?


Ray,

You need to set it to some place where the compound assembly of the
defaultfolder + your imagesource value actually resolves to a real file.

So if you have the following imagesource set:

ETS Items/ETS Item Bank/ETS10Q1/01 Full Bank/06 Math QTI 0with GUIDs and
96dpi PNG/Grade 06Math-49/images/mml2504101.png

And that ETS Items is located at ~/Desktop/Rays App/ so that the actuall
file path is:

~/Desktop/Rays App/ETS Items/ETS Item Bank/ETS10Q1/01 Full Bank/06 Math QTI
0with GUIDs and 96dpi PNG/Grade 06Math-49/images/mml2504101.png

Then you just need to set the defaultfolder to ~/Desktop/Rays App/

Image source has three possible resolutions:

(1) The image is inside revolution since imagesource value is an ID or image
name. Just figure out what image is and use it
(2) The image is a remote resource since we're given an fully qualified URL.
Load it from the server
(3) Image is a file on disk, see if it is a full path or relative path to
our defaultfolder and solve it.

I actually think that cases (2) and (3) are actually the same. I don't know
if you can simply pass a path without the binfile protocol in it.

Try changing your source to something like:

binfile:ETS Items/ETS Item Bank/ETS10Q1/01 Full Bank/06 Math QTI 0with GUIDs
and 96dpi PNG/Grade 06Math-49/images/mml2504101.png

Remember the relative folder, if possible, always use full paths by figuring
out the path before assembling the HTMLText chunk and replacing the
variables.





 Thanks,

 Ray

 -Original Message-
 From: use-revolution-boun...@lists.runrev.com
 [mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Andre 
 Garzia
 Sent: Friday, October 01, 2010 11:43 AM
 To: How to use Revolution
 Subject: Re: HTML Text

 On Fri, Oct 1, 2010 at 12:34 PM, Jeff Massung mass...@gmail.com wrote:

  On Fri, Oct 1, 2010 at 9:37 AM, Andre Garzia an...@andregarzia.com
  wrote:
 
   Hello there Ray,
  
   How do you set the image? Is it an ID reference like:
  
   image src=1091
  
  
  Holy crap does that work? I was doing it the hard way. And don't ask 
  me what that was, cause I'll feel really stupid if I post it. ;-)
 

 Basically the src attribute of the img node is used as the value for 
 the imagesource property. The imagesource property can be a value like 
 image ID, image Name, image URL or empty.

 If using an image URL which is what Ray is using, one thing to keep in 
 mind is the defaultfolder. He uses a relative folder in the 
 assignment, if the application run as an administrator or as a common 
 user has a different defaultfolder, then the relative path will break.

 HTMLText: http://docs.runrev.com/Property/HTMLText

 ImageSource: http://docs.runrev.com/Property/imageSource



 
  Jeff M.
  ___
  use-revolution mailing list
  use-revolution@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your 
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-revolution
 



 --
 http://www.andregarzia.com All We Do Is Code.
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




--
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-01-13 Thread stephen barncard
get the HTML from the website then

set the htmltext of fld yourfield to it


-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/13 Warren Kuhl warrenk...@gmail.com

 I am using the put url command to retrieve the html code from a website.
  Is
 there a command to strip out the html code?  I just want the text.

 ie.
 html
 body
 bThis is an example/b
 /body
 /html

 I would want:
 This is an example

 Thanks for any help,
 Warren
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-01-13 Thread Mark Schonewille

Warren and Stephen,

If you really want just the text, put fld yourfield into fld  
yourfield after setting the htmlText. Might sound weird, but it  
works. If you want to make it look clever and elegant, set the  
lockScreen to true while doing this.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

We make software, websites and webware. We are always looking for new  
projects. Feel free to contact us and ask for a quote without any  
further obligations

http://economy-x-talk.com/contact.html

Op 13 jan 2010, om 19:44 heeft stephen barncard het volgende geschreven:


get the HTML from the website then

set the htmltext of fld yourfield to it



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML Text

2010-01-13 Thread Warren Kuhl
Thank youthe htmltext worked perfectly!

Warren

On Wed, Jan 13, 2010 at 12:52 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 Warren and Stephen,

 If you really want just the text, put fld yourfield into fld yourfield
 after setting the htmlText. Might sound weird, but it works. If you want to
 make it look clever and elegant, set the lockScreen to true while doing
 this.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer

 We make software, websites and webware. We are always looking for new
 projects. Feel free to contact us and ask for a quote without any further
 obligations
 http://economy-x-talk.com/contact.html

 Op 13 jan 2010, om 19:44 heeft stephen barncard het volgende geschreven:


 get the HTML from the website then

 set the htmltext of fld yourfield to it


  ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution