I found what is causing the problem. ComboBoxSuper failed to work when the arrowButtonWidth wasn't set in the mxml. I never set it in my custom class because it seemed to be there already. There must be some default parameters that the mx:ComboBox pulls in and that my ComboBox version was inheriting without me knowing about it. ComboBoxSuper didn't inherit these values and fails silently.
Sigh. I've fought my way through the debugger and it is way beyond me. Something is setting the default styles and parameters for a combobox but I can't figure out where it is or how to force my ComboBoxSuper to pick them up. I hate relying on using the same class name... I'm reluctant to create an arrowButtonStyle in the ComboBoxSuper constructor -- that may fix that problem but I don't know what other defaults I'm missing because I can't extend the ComboBox. Anyone have a suggestion? ----- Original Message ----- From: Warren To: flexcoders@yahoogroups.com Sent: Friday, January 22, 2010 12:31 PM Subject: Re: [flexcoders] Custom ComboBox Class issue OK. I read up on manifest files and gave it a go. I had no manifest in my library project so I created one <?xml version="1.0"?> <componentPackage> <component id="ComboBoxSuper" class="myClassLibrary.ComboBoxSuper"/> <component id="ComboBox" class="myClassLibrary.ComboBox"/> </componentPackage> I added this to the library compiler, created a namespace URL http://myLibrary, and recompiled I changed my application from xmlns:myCL="myClassLibrary.*" to xmlns:myCL="http://myLibrary" and recompiled. Got no errors but it still doesn't work. I must be missing something once more. Can you elaborate a bit more about what is wrong and what I need to do to fix it? ----- Original Message ----- From: Vaibhav Seth To: flexcoders@yahoogroups.com Sent: Friday, January 22, 2010 11:18 AM Subject: RE: [flexcoders] Custom ComboBox Class issue its a problem with the namespace. check out for manifest.xml Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me ---------------------------------------------------------------------------- To: flexcoders@yahoogroups.com From: warrenony...@charter.net Date: Fri, 22 Jan 2010 09:17:16 -0600 Subject: [flexcoders] Custom ComboBox Class issue Yesterday I posted some code which fixes a bug and adds some features to the ComboBox. Because the ComboBox class has private functions in it, I was forced to copy the code into my own class and modify it. No problems except..... I had named my class ComboBox simply because I copied the code directly from the sdk. Yesterday I decided it might be a better idea to name it something different to distinguish it from the one in the sdk. I went into my class and renamed it to ComboBoxSuper. Now it doesn't work some of the time. If I use ComboBoxSuper as straight a mxml tag, it fails. If I create one in AS and then addChild it to a container, it works fine. I don't get it. Can anyone explain this behavior? Warren