concatenating with the ampersand

Klaus Major klaus at major-k.de
Sun Mar 11 12:26:41 EDT 2007


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




More information about the use-livecode mailing list