Hi Where is the documentation about the #use ?
Thanks, Simon On 23/12/2011 3:34 PM, Derrell Lipman wrote: > On Fri, Dec 23, 2011 at 13:58, Simon White > <[email protected] > <mailto:[email protected]>> wrote: > > Hi > > I would like to be able to create a new class by building the class name > at runtime as opposed to hard coding the class in code. Can this be > done? > > For example instead of > > var lo = new dcbase.myCustomerButton(); > > I would like to do the following: > > var lcClass = myWindow.Classname.substr(1,8)+"_con"+myButton.getLabel() > > var = new lcClass; > > > Simon, it looks like you are trying to instantiate an existing class, > rather than create a new class as you'd stated. Am I correct? > > To instantiate your IcClass class, you should be able to do something > like this: > > var clazz = qx.Class.getByName(IcClass); > var myIcClassInstance = new clazz(); > > Note that if there are no references to some of your classes, i.e., the > only access to them is via getByName(), then the generator will not > automatically include them in your build. In that case, you should add > #use entries to one of your Application.js file, for each of those > classes that the generator can't detect automatically. > > Derrell > > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > > > > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
