>
> Yes, the affected class needs the following:
>
> events : {
> "editor-ready" : "qx.event.type.Event"
> }
>
> All events which are dispatched by a class must be registered in
> the qx.Class.define phase.
Hmmm. Is it possible to do that programmatically? I've got a little
extension for our FCKEditor installation whereby a list of accelerator
keys are registered with the FCKEditor, resulting in a defined event
being thrown (code below, for 0.6.6) by the encapsulating qooxdoo widget.
For 0.7 is there a way of automatically registering the events for the
parent class?
Hugh
//
// Create a command handler with given name.
// When executed, it sends the named command event to
// any qooxdoo listener.
//
function _GetCommandHandler(sName)
{
var oFunction = function()
{
this.Name = sName;
}
oFunction.prototype.Execute = function()
{
getParentWidget().createDispatchEvent(sName);
}
return new oFunction
}
//
// This is called when loading is completed.
//
function FCKeditor_OnComplete(editorInstance)
{
loaded = true;
//
// Set up keyboard commands
//
var CTRL = 1000; // from fckconstants.js
var SHIFT = 2000;
var ALT = 4000;
var llCommands = [[CTRL + SHIFT + 68, 'AblingDraft'],
[9, 'AblingTab'],
[SHIFT + 9, 'AblingTabShift']];
for (var nCmd = 0; nCmd < llCommands.length; nCmd++)
{
editorInstance.KeystrokeHandler.SetKeystrokes(llCommands[nCmd]);
editorInstance.Commands.RegisterCommand(llCommands[nCmd][1],
_GetCommandHandler(llCommands[nCmd][1]));
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel