Hi,

I think he is referring to the old AS2 event model that used a backdoor
this['on' + funcName](eventObj) handler if a listener was not specified.

This is not how EventDispatcher in AS3 works now.

Could I see a bit more code? This has to be something really simple but,
there is no answer in what you have posted.

Peace, Mike

On 6/7/07, boy_trike <[EMAIL PROTECTED]> wrote:

  Am I missing something? All you are suggesting is that I change the name
from
DOreadTally to ONreadTally? Is there something else?

Bruce

--- In [email protected] <flexcoders%40yahoogroups.com>, RuneImp
<[EMAIL PROTECTED]> wrote:

>
> On 6/7/07, boy_trike <[EMAIL PROTECTED]> wrote:
> >
> > I have a pop that when being closed, it raises an event that is
handled in the parent
> > component. However the event is being handled TWICE.
> > <Code Snippet from Popup>
> > public static const READ_TALLY : String = "doReadTally";
> >
> >
> > // CALLED WHEN USER CLICKS THE CLOSE BUTTON
> > private function handleClose() : void {
> > model.dispatchEvent(new Event(READ_TALLY) );
> > mx.managers.PopUpManager.removePopUp( this );
> > }
> >
> > <Code Snippet from Parent Component>
> >
> >
> > private function init() : void {
> > model.addEventListener(READ_TALLY, doReadTally);
> >
> > }
> >
> > public function doReadTally( event : Event) : void {
> > trace('I am Here!');
> > cfcOrderEntry.readTally(model.webOrder.recID);
> > }
> >
> > My TRACE in the doReadTally Function is displayed twice in the
console. Any
Suggestions?
> >
>
> Try something like this instead.
>
> private function init():void
> {
> model.addEventListener(READ_TALLY, onReadTally);
> }
>
> public function onReadTally(event:Event):void
> {
> trace('I am Here!');
> cfcOrderEntry.readTally(model.webOrder.recID);
> }
>
> --
> RuneImp
> ImpTech - Web Hosting, Design & Development
> http://imptech.net
>




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to