createChild is the method you should typically use, although since most DataGrid cell renderers inherit from UIComponent, not View, they don't get createChild, which has auto-naming features; createClassObject in UIObject/UIComponent doesn't, so that's probably why he used it with a name, you actually have to pass a name for the 2nd parameter (unless you all are doing something diffferent beyond UIComponent in 1.5).
----- Original Message ----- From: "Gordon Smith" <[EMAIL PROTECTED]> To: <flexcoders@yahoogroups.com> Sent: Monday, April 25, 2005 2:41 AM Subject: RE: [flexcoders] Re: createClassObject If only a single Image named "imgE" is being created per cell, then you don't have to specify a unique name -- only children of a single parent have to have unique names. However, there is generally no good reason to ever specify a name in createClassObject. If you pass undefined for the second argument, Flex will generate a unique name for you. - Gordon -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Sunday, April 24, 2005 11:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: createClassObject --- In flexcoders@yahoogroups.com, "viraf_bankwalla" <[EMAIL PROTECTED]> wrote: > imgE = createClassObject(Image,"imgE", getNextHighestDepth()); Try avoiding the call to getNextHighestDepth() by maintaining your own counter. Also, I think the second argument to createClassObject() needs to be unique. Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/