Thanks Alex. I'm trying to use this interface as a common type. Any way to do that? Right now I have to cast it as an object, or create a wrapper accessor for dataField
On Tue, Jul 22, 2008 at 1:30 PM, Alex Harui <[EMAIL PROTECTED]> wrote: > You can't switch a var to a get/set pair. You can override its default > value though. > > > ------------------------------ > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Sean Clark Hess > *Sent:* Tuesday, July 22, 2008 11:51 AM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Re: how to override a public var, or put it in an > interface? > > > > Oh, I forgot to mention. The reason why the interface doesn't work is > because it was implemented as a public var instead of an accessor. > > On Tue, Jul 22, 2008 at 12:50 PM, Sean Clark Hess <[EMAIL PROTECTED]> > wrote: > > I want to make a class that works with both DataGridColumn and > AdvancedDataGridColumn. Each of these has a "dataField" property. I have > subclassed each, and they both implement a common interface. In the > interface, I have > > > > function set dataField(value:String):void > > function get dataField():String > > > > I get the error "Interface method get dataField ... is implemented with an > incompatible signature" > > > > So, if I try to override it in the subclass, I get "incompatible override" > > > > Is there a good way to do this? I guess I could leave it out of the > interface and cast it as an object to work with dataField, but that's kind > of lame. > > > > >