What do you mean by VO?
-J
On Fri, Apr 18, 2008 at 8:26 AM, Rich Rodecker <[EMAIL PROTECTED]> wrote:
> Just looking for pointers on how to handle this situation:
>
> I have a BaseComponentClass, with several subclasses. Each of these
> subclasses also has a corresponding VO.
>
> All the subclass components use a getter/setter dataProvider property
> which expects a vo which matches their corresponding type. So, I'm thinking
> logically the dataProvider property is defined in the BaseComponentClass and
> overridden in each subclass.
>
> The problem I run into is that you can't change the method signature in an
> override, so i can't reset the expected parameter type in the overridden
> prop:
>
> // defined in BaseComponent:
> public function get dataProvider ():BaseVO {
> return _dataProvider;
> }
>
> public function set dataProvider (value: BaseVO):void {
> _dataProvider = value;
> dataProviderChanged = true;
> invalidate();
> }
>
> //can't do this in subclass:
> override public function get dataProvider ():SubclassVO {
> return _dataProvider;
> }
>
> override public function set dataProvider (value:SubclassVO):void {
> _dataProvider = value;
> dataProviderChanged = true;
> invalidate();
> }
>
>
> The way I'm seeing it, I can either just use the BaseClassVO for the type,
> or create an interface for the vo, but either way it seems like I'm going to
> have to cast it every time I try and access it in the subclasses.
>
> Any suggestions?
>
>
--
"Therefore, send not to know For whom the bell tolls, It tolls for thee."
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]