If it were me trying to solve this problem, I would look to the
qx.event.message.Bus system. Inside your event listener, you will dispatch
an event of a type you create and pass along the information that other
parts of the program would want access to. It might look like this:
object_my_class.addEventListener("changeSelected", function ()
{
qx.event.message.Bus.dispatch(new
qx.event.message.Message('my_class_change_selected',
object_my_class.someproperty));
});
then for the other parts of the program to get at that event you simply
subscribe to that message, like this:
qx.event.message.Bus.subscribe('my_class_change_selected',
function(message){
var theData = message.getData(); // returns the data you supplied in the
creation of the message event
// do something with theData here...
})
I have found the message Bus to be a very powerful thing and have learned to
love it!
Jim
On Thu, Apr 10, 2008 at 1:57 PM, Alejandro Paz <[EMAIL PROTECTED]>
wrote:
> Hello friends qooxdoo. First of all, I do not speak or write English so I
> am using GOOGLE to translate. I speak Spanish.
>
> I am using the libraries and made my own "class".
> Here a mini example:
> qx.Class.define("LBLCombo",
> {
> extend : qx.ui.layout.HorizontalBoxLayout,
> construct : function (label)
> {
> this.base(arguments);
> this.set(
> {
> spacing : 2
> });
> this._Label = new qx.ui.basic.Label(label);
> this._Label.setWidth(100);
> this._Combo = new qx.ui.form.ComboBox();
> this._Combo.setWidth(150);
> this.add(this._Label, this._Combo);
> },
> members :
> {
> _Label : null,
> _Combo : null,
> getLabel : function () { return this._Label },
> getCombo : function () { return this._Combo },
> }
> });
>
> I would like to add an EVENT to MY OWN CLASS for not having access to an
> object that contains this.
>
> My need in particular is my definition in my class who accepts the event
> changeSelected and that activate when the event occurs changeSelected combo
> of this within the same class.
>
> I wish I could do:
> object_my_class.addEventListener("changeSelected", function () {
> alert(miclase.getSelected()); });
>
> And as a result obtain:
> qx.ui.form.ListItem()
>
> How can I do this? :S
> Thank you.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
Jim Hunter
DAILY THOUGHT: SOME PEOPLE ARE LIKE SLINKIES - NOT REALLY GOOD
FOR ANYTHING BUT THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel