new PModel(this) should do the trick without casting.

This usage is really defeating the purpose of the Presentation Model pattern
though. The PM should not know anything about the view it works for.

regards,
Christophe

-- 
Christophe Herreman
http://www.herrodius.com
http://www.springactionscript.org
http://www.as3commons.org

2009/12/16 vikram <[email protected]>

>
>
> Hello all
>
> I need to pass my view to the presentation model I have created for the
> view. I need to pass the view object in the constructor of presentation
> model. How can I do that? I tried doing this...
>
> public var pmodel:PModel = new PModel( View(this) );
>
> // This gives an undefined View function error.
>
> Please help!!!
>
> Thanks and Regards
> ShiVik
>
>  
>



-- 
Christophe Herreman
http://www.herrodius.com
http://www.springactionscript.org
http://www.as3commons.org

Reply via email to