concatenating with the ampersand

john at debraneys.com john at debraneys.com
Sun Mar 11 16:59:15 EDT 2007


Hi, 

I haven't read all the replies on this one but did notice in your script fragment

>> put quote & "lineNum"&"H"&quote into fldName -- creates a field 

that lineNum is quoted eg "lineNum". That will always put the literal string lineNum into the container rather than the value of lineNum. Just drop the quotes and the concatenation should work.

Regards

John T

>-----Original Message-----
>From: Klaus Major [mailto:klaus at major-k.de]
>Sent: Sunday, March 11, 2007 12:26 PM
>To: 'How to use Revolution'
>Subject: Re: concatenating with the ampersand
>
>Hi Joe,
>
>> OK, Phil. I wasted about an hour fiddling with this. It just 
>> wouldn't compile. The result was always lineNumH instead of "1H" 
>> for the first line when it is clicked on.
>>
>> -- I have a scrolling field with a bunch of numbered phrases.on 
>> mouseup
>> put word one of the value of the clickline into lineNum -- 
>> provides number w/ a periof
>> delete last char of lineNum -- deletes the period
>> put quote & "lineNum"&"H"&quote into fldName -- creates a field 
>> name such as "1H"
>> send mouseup to field fldName -- sends the mouseup to the 
>> appropriate field
>
>I might be a bit late, but anyway, try this:
>
>## in case this is a list field you can could also use:
>## put word one of the selectedtext of fld "xyz" into lineNum
> put word one of the value of the clickline into lineNum -- 
>provides number w/ a periof
> delete last char of lineNum -- deletes the period
>
>## sometimes brackets are highly recommended, especially when creating
>## object names with variables!
> put (lineNum &"H") into fldName
>
>## creates a field name such as "1H" and DOES now :-)
> send mouseup to field fldName -- sends the mouseup to the 
>appropriate field
>
>> Good luck and TIA,
>>
>> Joe wilkins
>
>Regards
>
>Klaus Major
>klaus at major-k.de
>http://www.major-k.de
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list