what is a BitlessEvent?

51 views
Skip to first unread message

wahaha

unread,
Sep 7, 2011, 2:58:46 AM9/7/11
to Google Web Toolkit
what is a BitlessEvent,and what is the difference betten this to a
normal Event ?

wahaha

unread,
Sep 10, 2011, 4:12:12 AM9/10/11
to Google Web Toolkit
any body knowes?

Thomas Broyer

unread,
Sep 10, 2011, 4:43:03 AM9/10/11
to google-we...@googlegroups.com
Events in GWT use a bitfield (see sinkEvents and the various constants on com.google.gwt.user.client.Event). Unfortunately, it limits the total number of events that GWT can support to 32, which is soon to be exhausted.
For browsers which "do not leak" (see http://code.google.com/p/google-web-toolkit/wiki/UnderstandingMemoryLeaks ), that is, almost all but IE, you can add new DomEvent types without the need for a reserved bit in the bitfield (they'd be attached "by name" rather than "by bit"). addBitlessDomHandler will "addEventHandler" (in the JS) using the DomEvent#Type.getName(), rather than deferring to sinkEvent with the bit corresponding to that name (resolved by Event.getTypeInt(String)).
Reply all
Reply to author
Forward
0 new messages