Thanks Alex, what does that mean? (how to change the code?) I've never used mx_internal before...
In doing more research I found this link: http://winxalex.blogspot.com/2012/06/override-mxinternal-function-error-1004.html which agrees with last entry in this link: http://forums.adobe.com/message/2966061 but adjusting the code as follows: //import mx.core.mx_internal; //use namespace mx_internal; public namespace mx_internal="http://www.adobe.com/2006/flex/mx/internal"; public class OptgroupDropDownList extends DropDownList { override mx_internal function setSelectedIndex(value:int, dispatchChangeEvent:Boolean = false, changeCaret:Boolean = true):void { ... gives this compile error: "A file found in a source-path can not have more than one externally visible definition. com.mycompany.views.components:mx_internal; com.mycompany.views.components:OptgroupDropDownList" ----- Original Message ----- From: "Alex Harui" <[email protected]> To: [email protected] Sent: Friday, December 6, 2013 8:03:47 AM Subject: Re: error overriding mx_internal method setSelectedIndex() Pretty sure in 4.11 that method became public. On 12/6/13 7:35 AM, "[email protected]" <[email protected]> wrote: >I'm trying to adopt the source code from here > >http://flexponential.com/2010/01/31/spark-dropdownlist-equivalent-of-the-h >tml-optgroup-concept/ > >to disable some items in a drop down list. In the OptgroupDropDownList.as >file I'm getting this compile error using the 4.11 SDK: > >"Method marked override must override another method." > >on this line of code: > >override mx_internal function setSelectedIndex(value:int, >dispatchChangeEvent:Boolean = false, changeCaret:Boolean = true):void > >I wonder if anything has changed in the SDK since the original blog >posting that gives rise to this error? > >When I go to mx.core.mx_internal, there's not much code there. If I >remove "override" it compiles and runs (interestingly, the similar line >of code for overriding setSelectedIndices() doesn't give a compile >error), but this doesn't result in the correct functionality (I guess, as >expected, without a proper override). Any feedback appreciated. >
