MXML compiler will wrap the class in a classfactory for you. Should look like:
<mx:DateField id="dfEndDate" dropdownFactory="au.com.redenergy.wayne.Components.Editors.DateChooserWi thHighDate" /> Or you might have to import in a script block and just use the leaf name in the dropdownFactory attribute. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Pitt Sent: Sunday, November 25, 2007 9:35 PM To: [email protected] Subject: RE: [flexcomponents] Extending DateField - createDropDown() & parent Doesn't appear to (though, I must admit I missed that...) <mx:DateField id="dfEndDate" dropdownFactory="{new ClassFactory(au.com.redenergy.wayne.Components.Editors.DateChooserWithHi ghDate)}" /> I set a breakpoint in the creationComplete() function, but it's never hit. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Monday, 26 November 2007 4:19 PM To: [email protected] Subject: RE: [flexcomponents] Extending DateField - createDropDown() & parent addPopUp parents the _dropdown You shouldn't need to subclass, simply set dropdownFactory to a class factory for your subclass of datechooser. Did that not work? ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Pitt Sent: Sunday, November 25, 2007 7:57 PM To: [email protected] Subject: [flexcomponents] Extending DateField - createDropDown() & parent Hi I'm trying to extend the DateChooser class, providing a custom dropdown when the user clicks the icon. The custom dropdown extends DateChooser, so (in theory), everything should be simple, right? Except that the createDropDown method of DateField is private. Here's what I've done so far: * Overridden createChildren, calling super.createChildren(), and my own createDropdown() which creates my subclassed date chooser * Overridden the getter and setter for dropdownFactory(), returning a class factory for my subclass The problem I'm having is that when the private displayDropdown is called, specifically on the line: point = dd.parent.globalToLocal(point); dd resolves to my subclass, but it's parent is null. I can't see where this is set in the super DateField class. What am I missing? How do I do this? Thanks in advance for any help. Marty
