RE: Event.initEvent() after event dispatch

> -----Original Message-----
> From:	David Flanagan [SMTP:david@oreilly.com]
> 
> The description of the initEvent() method of the Event interface says
> (in part): "This method may only be called before the Event has been
> dispatched via the dispatchEvent method". 
> 
	Yes, I am now confused too. I was under the impression that Events
	may be recycled and that initEvent, initUIEvent, etc might be called on
	an event many times on events that have been dispatched and returned.
	I suppose I'm making this assumption because there would be no need
	for an initEvent method at all if it could only be called once (you could
	just pass the initialisation parameters to the createEvent method) and
	because initEvent may be used to initialise "only the values specified in
	initEvent" (meaning you might re-initEvent an existing UIEvent?). If it is
	intended that this method never be called after it has been dispatched
	then perhaps it should be stated more clearly? The part about "though
	it may be called multiple times during that phase if necessary" is
	confusing. During what phase? The dispatchEvent "phase" or something
	that has to do with phaseType?

	Mike

Received on Tuesday, 21 August 2001 23:04:27 UTC