Re: yet more DOM Level 3 Events issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 24 July 2003 8:45 pm, Philippe Le Hegaret wrote:
> On Tue, 2003-07-22 at 04:28, Christian Parpart wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > hi
> >
> > it is said in the spec that TextEvent and KeyboardEvent are child classes
> > of UIEvent (of course).
> > UIEvent needs a detail arg to be passed to be initialized. but the
> > initializer routines of KeyboardEvent and TextEvent do not get these?
> > Why?
>
> TextEvent and KeyboardEvent don't use detail as a context information.
> UIEvent do have a detail parameter in init and it can be used by
> sub-classes, such as MouseEvent.
>
> > How shall these handle this?
>
> In any case, the detail property value of TextEvent and KeyboardEvent
> has no specific meaning. I would suggest initializing to 0 but you can
> do otherwise in your implementation if you wish :)
>
> One can argue that it is possible to generate a valid Mouse event with
> using only initUIEvent, so I would be in favor of keeping the statu quo,
> i.e. the value of detail is undefined on text event and keyboard event.
> Applications may still wish to initialize the value of detail using
> initUIEvent (since it is supported in text and keyboard event objects as
> well) but it is certainly useless.

Well, yeah, that's what I wanted to know. The detail property is undefined on 
interface KeyboardEvent and TextEvent so I can just set it to zero since the
init methods in my implementation invoke the init method of UIEvent to 
initialize their values ;)

btw, in my eyes it wasn't clear enough defined in the spec, so this should be 
explicitely said there....

Thanks,
Christian.

- -- 
 21:47:40 up 65 days, 12:54,  0 users,  load average: 0.05, 0.04, 0.00
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/IDm1Ppa2GmDVhK0RAso7AJ9+sYhqP+BwlMLy+ZrgpK9LDhzEVQCfaHVD
EHf2lKdDEDgwpQmG8ef1KOc=
=j4x/
-----END PGP SIGNATURE-----

Received on Thursday, 24 July 2003 15:51:42 UTC