Looks like a bug.  We expected the source to be an EventDispatcher.  Can
you subclass EventDispatcher instead of Object?

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Pan Troglodytes
Sent: Tuesday, May 01, 2007 9:31 PM
To: flexcoders
Subject: [flexcoders] ProgressBar.mode="polled" gives me problems

 

All the help says about setting ProgressBar.mode="polled" is:


polled: The source property must specify an object  that exposes
getBytesLoaded() and getBytesTotal()  methods. The ProgressBar control
calls these methods to update its status. 

But this doesn't seem to be true.  For example, it seems
ProgressBar.commit always wants to do this to the source:
                    _source.removeEventListener(ProgressEvent.PROGRESS,
progressHandler);
                    _source.removeEventListener(Event.COMPLETE,
completeHandler);

Which is a real drag if your source was going to be a simple little
object with just getBytesLoaded() and getBytesTotal() methods.

It's a bit silly that the code always tries to remove these event
listeners whenever you set the source, since these event listeners never
got set to begin with (the source was empty before setting it).

Is there something I'm missing or is the mode="polled" setting a bit
funky?  My searches seem to show very little information for people
using it this way. 

-- 
Jason 

 

Reply via email to