Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6890543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:17:44+00:00 2026-05-27T06:17:44+00:00

I have a question regarding P2P with flex. When passing data between two applications

  • 0

I have a question regarding P2P with flex.
When passing data between two applications using P2P. I get the following error:

 warning: unable to bind to property 'piece' on class 'Object' (class is not an IEventDispatcher)

I’ve spent a few days using Google to try and find a solution, but a can’t get rid of that error. I’ve tried using ObjectUtils, direct assignment, and creating a new ArrayCollection WITH the ObjectUtils inside the parenthesis and still can’t solve the problem.

Purpose of code:
  -> Two users connect via P2P
  -> 1st user can manipulate pictures (stored as objects in the array collection).
  -> 1st user sends updated ArrayCollection (with changed pictures) to 2nd user
  -> 2nd user’s ArrayCollection gets updated and now sees manipulated pics

As far as my knowledge of Flex goes (fairly new to it), I properly Binded what needed to be binded. Using pop-ups and trace, I was able to see that the data from the ArrayCollection gets copied in properly, but it just doesn’t want to display.

Here are some snippets of my code:

[Bindable]
public var taken:ArrayCollection = new ArrayCollection ([
    new picLayout(1,'sky.png'),
    new picLayout(2,'bird.png')
    ])

public function receiveSomeData(pass:ArrayCollection):void
{   
    // Want to replace current version of variable "taken" with
    // the one passed in using P2P
    this.taken= new ArrayCollection(pass.source);
}

public function sendSomeData(free:ArrayCollection):void
{   
    sendStream.send("receiveSomeData",free);
}

<s:Button click="sendSomeData(taken)" label="Update" />

Thank You for your help and time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:17:44+00:00Added an answer on May 27, 2026 at 6:17 am

    I figured out what the problem was and how to fix it – with partial thanks to these pages:

    Unable to Bind warning: class is not an IEventDispatcher

    Flex Warning: Unable to bind to property 'foo' on class 'Object' (class is not an IEventDispatcher)

    I knew that the information was being successfully sent to the other peer, but the problem was that the objects INSIDE the ArrayCollection weren’t made bindable.

    My solution to the problem was as follows:

    • Create a loop that sends each object in the ArrayCollection along with an index that tells you what value in the ArrayCollection you are streaming.

    • Now, since you are “streaming” the data, overwrite the current ArrayCollection, using the setItemAt() function with first field as “new ObjectProxy(passedObject)” and the second field as the passedIndex (Note): the ObjectProxy() function forces the passed object to be bindable.

    Here is an updated snippet of my code:

    [Bindable]
    public var takenPics:ArrayCollection = new ArrayCollection ([
        new picLayout(1,'sky.png'),
        new picLayout(2,'bird.png')
        ])
    
    private function sendSomeData(data:Object, index:int):void
    {   
        sendStream.send("receiveSomeData",data,index);
    }
    
    private function receiveSomeData(passedPic:Object,ix:int):void
    {   
        // ObjectProxy needed to force a bindable object
        takenPics.setItemAt(new ObjectProxy(passedPic),ix);
    }
    
    public function sendPictures():void
    {
        // ix < 2 because size of ArrayCollection is 2
        for (var ix:int = 0; ix<2; ix++)
            sendSomeData(takenPics[ix],ix);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question regarding editing/saving data in database using Django. I have template
I have a question regarding the two additional columns (timeCreated, timeLastUpdated) for each record
I have a question regarding the integration of business objects developed using Linq To
I have a question regarding a unified insert query against tables with different data
I have a question regarding map api. I was using the the google map
I have a question regarding Wicket's Datatable. I am currently using DataTable to display
I have a question regarding locking in TSQL. Suppose I have a the following
I have a question regarding the development of liferay portlets using the liferay plugin
I have a question regarding using intptr_t vs. long int . I've observed that
I have question regarding about finding subview using '.tags' in one UIView. for (UIView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.