On Thu, Apr 17, 2008 at 5:27 PM, Josh McDonald <[EMAIL PROTECTED]> wrote:
>
> What do you mean by VO?

VO means ValueObject (a.k.a. DTO (Data Transfer Object)) .. It's a
simple object, with no logic, used to carry data around in typed
bundles.  Instead of using an anonymous object like
{ username: "Castros", password :"Bar", id:666 }, you have a typed
UserVO object for which you can expect that you'll have a username
:String, password :String, id:uint.


Rich, I think you'll probably have to cast on the setter every time
for subclasses. Of course, internally, you'll want to have a typed
copy of your data.

override public function set dataProvider(value :BaseVO) :void {
     _myTypedData = value as SubclassVO;
     //... invalidate.. etc.
     // ....
}

I does make sense, though: outside classes that are expecting your
particular interface don't really know that subclasses can use more
sophisticated subclassed version of your object.  You'll have to
choose at what level of specificity you want to define your interface.

If you find a cleaner solution, though, it'd be cool to know!


-- 
gabriel montagné láscaris comneno
http://rojored.com
t/506.8392.2040

Reply via email to