Duh, should have caught that! Then again, maybe i shouldn't send email when driving!
On Oct 22, 2010, at 6:29 AM, Henry Minsky <[email protected]> wrote: > If I use the "new" operator, it works properly for me, the red square is > instantiated in all runtimes. > > > <canvas debug="true"> > > <class name="aclass" bgcolor="red" width="100" height="100"> > > </class> > > <handler name="oninit"><![CDATA[ > var newview = new lz.aclass(canvas,{x:10,y:10}); > ]]></handler> > > </canvas> > > > On Thu, Oct 21, 2010 at 5:35 PM, Max Carlson <[email protected]> wrote: > Can you take a look? > > > > Begin forwarded message: > >> From: Grig <[email protected]> >> Date: October 21, 2010 1:09:37 PM MDT >> To: Max Carlson <[email protected]> >> Subject: the new newing >> > >> I was trying to get things rolling in the latest build. I need this to work, >> but it doesn't: >> >> >> var newview = lz[className](viewToBuildIn, tempArray); >> >> >> className is passed to the function. I haven't found a way to new a view >> where the name isn't hard coded as in: lz.myclass(viewToBuildIn, tempArray); >> >> >> In this test case, the newview is never made. So I'm not sure what I'm >> missing with the new code. >> >> <canvas debug="true"> >> >> <class name="aclass" bgcolor="red" width="100" height="100"> >> >> </class> >> >> <handler name="oninit"><![CDATA[ >> >> // lpsbuild: tr...@17706 (17709) >> >> >> var aview = canvas.makeChild({ name: "aclass" }); >> >> // after the line above, debug reports: ERROR: Attempt to instantiate >> <aclass>, which has not been defined >> >> >> >> var newview = lz.aclass(canvas,{x:10,y:10}); >> >> // after the line above, nothing happens >> >> ]]></handler> >> >> </canvas> >> >> >> I hope you made it safely down the mountain! >> >> Cheers! >> >> G >> >> > > > > -- > Henry Minsky > Software Architect > [email protected] > >
