On Fri, Oct 1, 2010 at 12:52 PM, Ray Horsley <[email protected]> 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: [email protected] > [mailto:[email protected]] 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 <[email protected]> wrote: > > > On Fri, Oct 1, 2010 at 9:37 AM, Andre Garzia <[email protected]> > > 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 > > [email protected] > > 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 > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > > _______________________________________________ > use-revolution mailing list > [email protected] > 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 [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
