You can't switch a var to a get/set pair.  You can override its default
value though.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Sean Clark Hess
Sent: Tuesday, July 22, 2008 11:51 AM
To: [email protected]
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]
<mailto:[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. 

 

 

Reply via email to