Hello :)

it's not a problem ;) only a supplement to highlight this feature.

For me i think the clone() method call alway in the dispatch event isn't the
better fast solution to dispatch the events ... but it's an other story ;)

EKA+ :)



2007/9/1, Muzak <[EMAIL PROTECTED]>:
>
> I don't see why this is a "problem" as it's properly documented:
>
> http://livedocs.adobe.com/flash/9.0/main/00000138.html
>
> <quote>
> Event class utility methods
>
> There are two utility methods in the Event class. The clone() method
> allows you to create copies of an event object. The toString()
> method allows you to generate a string representation of the properties of
> an event object along with their values. Both of these
> methods are used internally by the event model system, but are exposed to
> developers for general use.
> For advanced developers creating subclasses of the Event class, you must
> override and implement versions of both utility methods to
> ensure that the event subclass will work properly.
> </quote>
>
> <quote>
> when creating an Event subclass you must override the clone() and
> toString() methods to provide functionality specific to the
> subclass.
> </quote>
>
> I've read about it first in the Flex 2 docs though (which is alot better
> than the Flash docs IMO):
> http://livedocs.adobe.com/flex/201/html/createevents_140_5.html
>
> <quote>
> You are required to override the Event.clone() method in your subclass.
> The clone() method returns a cloned copy of the event object
> by setting the type property and any new properties in the clone.
> Typically, you define the clone() method to return an event
> instance created with the new operator.
>
> </quote>
>
> regards,
> Muzak
>
> ----- Original Message -----
> From: "eka" <[EMAIL PROTECTED]>
> To: <flashcoders@chattyfig.figleaf.com>
> Sent: Saturday, September 01, 2007 8:54 AM
> Subject: Re: [Flashcoders] AS3 Events, Delegates and passing parameters
>
>
> > Hello :)
> >
> > The events are cloned the second time in the dispatchEvent method.
> >
> > My article about this problem in french :
> >
> http://www.ekameleon.net/blog/index.php?2007/08/25/75--as3-event-class-and-the-clone-method
> >
> > EKA+ :)
> >
> > 2007/9/1, T. Michael Keesey <[EMAIL PROTECTED]>:
> >>
> >> On 8/31/07, Mark Carolin <[EMAIL PROTECTED]> wrote:
> >> > I believe you could pass a custom Event with all the properties you
> >> want.
> >>
> >> Yes, but one word of warning about extending Event: be sure you
> >> override Event.clone() so that it returns an instance of your class!
> >> (Events are cloned when they are dispatched.)
> >>
> >> --
> >> T. Michael Keesey
>
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to