  | | | Novice at MEL | Novice at MEL 2003-11-27 - By deane@(protected)
Back On Wed, Nov 26, 2003 at 04:06:47AM +0100, David Mart�nez Carrasco wrote: > > I have a "textScrollList" and i don?t wanna to put flags manually. Before > to enter to the definition of this control, i define a string and I > assign the text of the flag like this: > --- > > string $texto = "-append \"1a\" -append \"1b\" -append \"1c\""; > --- > > So later, i dunno how to put inside of the control. I tried this but > script editor says me that the flag is invalid (I have a layout and a > window but I will don?t show the code here): > > --- > textScrollList -numberOfRows 8 -allowMultiSelection true > -p estBaseVentana > ($texto); > ---
If you want to use a string for part of a command (as opposed to one of the command's arguments) then you must treat the entire command as a string and execute it using eval(). E.g:
eval( "textScrollList -numberOfRows 8 -allowMultiSelection true + " -p estBaseVentana " + $texto );
That should do the trick for you.
=========================================================================== - deane Gooroos Software: Plugging you into Maya
Visit http://www.gooroos.com for more information
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|
 |