value of variable
hershrev at realtorsgroup.us
Sat Oct 9 19:55:16 CDT 2004
On Tuesday, September 28, 2004, at 09:28 PM, Ken Ray wrote:
> On 9/28/04 5:42 PM, "Hershel Fisch" <hershrev at realtorsgroup.us> wrote:
>> on mouseUp
>> answer "What kink of file are you putting ?" with "Tab Delimited"
>> "Comma Delimited" and "Cancel"--and on
>> put word 1 of it into sFileType
>> if sFileType is "cancel" then
>> exit mouseUp
>> answer file "a"
>> put it into fld "f1"
>> do " put URL" & quote & "file:"& it & quote &" "&"into fld" &" "&
>> quote & "f1" & quote
>> replace sFileType with "'" in fld "f1"
>> end if
>> end mouseUp
> Hershel, your code above puts the path from 'answer file' into fld
> "f1", and
> then puts the contentes of the file into the same field, overwriting
> it. You
> don't need to do that. You also don't need to do the replace action on
> data *in* the field; it's best to do it in a variable first. To use the
> string that came back from the first "answer", you need to use "do" to
> resolve it to a variable and not a string. Something like this:
Thanks, the reason I put it into the fld is to see whats going on.
> answer file "a"
> if it <> "" then
> put url("file:" & it) into tData
> do "replace" && sFileType && "with" && quote & "'" & quote in tData
> put tData into fld 1
> end if
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the use-livecode