  | | | Subject: -on1 syntax brain fart | Subject: -on1 syntax brain fart 2003-12-17 - By Andy Rawling
Back Doug Meyer wrote:
>Hey guys, been working on a script for a long time here, beginning to lose >focus I think...heh... > >What is the proper way to embed a string into an -on1 flag on a radio >button? I need to have the radio button assign a string to a global variable >upon being selected, and then print that global variable. Do i need to use >an intermediate variable? How do i go about this since even doing that will >require me to have the actual string text within the -on1 flag? > >I have two radio buttons that each need to do this.... > >Sample code: > >RadioButtonGrp -numberOfRadioButtons 2 -label "What Type?" -labelArray2 >"TypeOne" "TypeTwo" -on1 "$gType = "Type One"; print $gType;" -on2 "$gType = >"Type Two"; print $gType;" > > >Thanks > >Doug Meyer > > >-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- >List-help: <mailto:listar@(protected)?Subject=help> >List-unsubscribe: <http://www.highend3d.com/maya/listserver/> >List-subscribe: <http://www.highend3d.com/maya/listserver/> >List-archive: <http://www.highend3d.com/maya/archive/> > > > I think you just need to escape your quotes there:
radioButtonGrp -label "What Type?" ... -onCommand1 "$gType = \"Type One\"; print $gType;" ... myButtonGrp;
- Andy
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-unsubscribe: <http://www.highend3d.com/maya/listserver/> List-subscribe: <http://www.highend3d.com/maya/listserver/> List-archive: <http://www.highend3d.com/maya/archive/>
|
|
 |