dumb question #1
Devin Asay
devin_asay at byu.edu
Tue Jun 6 17:09:16 EDT 2006
On Jun 6, 2006, at 2:42 PM, Devin Asay wrote:
>
> On Jun 6, 2006, at 2:08 PM, Josh Mellicker wrote:
>
>> I'm going to ask some dumb questions, I am still fuzzy on paths
>> and some basic variable issues:
>>
>> After this:
>>
>> answer file "locate the .htm file for me please" as sheet
>> put it into htmPathFile
>>
>> if i put:
>>
>> put URL "file:" & htmPathFile into fld "htm"
>>
>>
>> this results in the path & filename going in the field, not the
>> contents of the file.
>>
>> ----
>>
>> 2.
>>
>> but this:
>>
>> put "file:" & htmPathFile into tFile
>> put URL tFile into fld "htm"
>>
>> results in the actual text content of that file being put in.
>>
>> ----
>>
>> I don't understand why they are different?!?
>
> Josh,
>
> This is a quirk that has gotten many of us at some time. The
> problem is the order in which rev resolves parts of the statement.
> Try this:
>
> put URL ("file:" & & htmPathFile into fld "htm")
>
> That forces the file name to be resolved before the put URL part of
> the statement.
Sorry, one too many &'s in that example.
put URL ("file:" & htmPathFile into fld "htm")
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list