Hey,
Is there a possibility to pass the this-reference to the callback function?
No, the converter does not offer the setting of a context so you can use the
closure variant you already suggested. Another way would be to bind the
converter function using the function bind [1], which qooxdoo offers as
polyfill. This might be a more elegant way.
Another question is:
I have a button, in that execute listener I want to call a callback function
which is defined in another class, and in that callback-
function I want to use the this-reference of the same class, how can I do
that?
As the function 'showConfirmationDialog' is a plain JavaScript function, you
can use either call or apply to set the context of the function. Just check out
the MDN article on both functions [2] [3] to get an idea of how to use them.
Regards,
Martin
[1]
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind
[2]
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/call
[3]
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/apply
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel