| Summary: | [client] Provide public client API for global "system" events/callbacks | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Tim Buschtoens <tbuschto> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | tbuschto |
| Version: | 2.0 | ||
| Target Milestone: | 2.0 RC1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Tim Buschtoens
We will deliberately use a different event API than SWT/ClientScripting, to make it clear that the "rap" object is not part of the Widget Toolkit and behaves differently. ("rap" also is no clientObject, has no instances, provides no event objects, etc.). The API will be:
rap.on( "eventtype", handler );
rap.off( "eventtype", handler );
A "once" (or similar) method may be introduced later. Event names will be all lowercase and the handler will be executed in global context only. De-registering (e.g. on destroy) is currently completely the responsibility of the widget/handler code, and registering an inline anonymous function would make it impossible to do so. A simplified or alternative way to (de-)register listener may therefore built on top of this API later on.
The events will be "send" and "render".
Fixed with commit 2681ced8cc26960dd80d4cde5162b90a9dafd767 |