Evan you were right, there was an issue with my RemoteAlias ... I was
using my fully qualified reverse DNS name for the VO, when I should
have been using the remote name, which was not qualified at all --
sorry for so many posts on this issue - but thanks for your help !
--- In cairngorm-documentation@yahoogroups.com, "jeremysavoy"
<jeremysavoy@...> wrote:
>
> I have an array collection that is a collection of ContactVO items.
> When I debug and look at the ArrayCollection, each item, [0], [1], etc
> is of type ObjectProxy, and insed each of these there is an "object"
> that then contains the ContactVO fields. I'm assuming they are
> ObjectProxy because I implemented the fix outlined at the bottom of
> this page:
>
>
http://livedocs.adobe.com/flex/2/langref/flash/events/IEventDispatcher.html
>
> The problem, is that when I try to assign a ContactVO directly to an
> item in the ArrayCollection, as here:
>
> for (var i:int = 0, i < __model.myAC.length, i++){
> if (__model.myAC[i].Contact_ID == this.Contact_ID) {
> __model.contact = __model.myAC[i];
> }
> }
>
> I then get the following error on the assignment line number (last
> line of code above).
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> mx.utils::ObjectProxy@10eee479 to com.myproject.vo.ContactVO
>
> If I assign each individual field from __model.myAC[i].* to
> __model.contact.*, one at a time, then that works - but is undesirable
> and extra work - I suppose I would just implement a function to do this.
>
> Is there any better solution? I have tried the following but got a
> similar but maybe different error:
>
> __model.contact = __model.myAC[i] as ContactVO;
>