I am having a bit of a problem actually getting something simple to work. I
can create a Mixin and my code still works, but as soon as I try and include
the Mixin in qx.ui.core.Widget the code does not execute anything past that
line. Here is the sample Application file I have created, please let me know
why it doesn't work. If you comment out the include line, the code runs
fine.
qx.Class.define("Application",
{
extend : qx.application.Gui,
members :
{
main : function()
{
// Call super class
this.base(arguments);
qx.Mixin.define("MObject",
{
"properties" :
{
"ToolId" :
{
check : "string",
init : ""
},
"MyToolId" :
{
check : "string",
init : ""
}
},
"members" : {
getMyToolId : function()
{ // will put code in here later once I get it working
}
}
});
qx.Class.include(qx.ui.core.Widget, MObject);
// Create button
var button1 = new qx.ui.form.Button("First Button", "./button.png");
// Set button location
button1.setTop(50);
button1.setLeft(50);
// Add button to document
button1.addToDocument();
// Add an event listener
button1.addEventListener("execute", function(e) {
alert("Hello World!");
});
}
}
});
Thanks,
Jim
www.D4PHP.org
www.D4PHP-Hosting.com
On 6/11/07, Dietrich Streifert <[EMAIL PROTECTED]> wrote:
>
> I'm doing this at the end of the mixin JS File in this case the
> MBinding.js file:
>
> qx.Class.include(qx.ui.core.Widget,qx.visionet.xml.MBinding);
>
>
> dperez schrieb:
> > Hi
> >
> > Can I attach a mixin to an already created object?
> > This feature is different than including a mixin to a class.
> >
> >
> > Regards,
> > David
> >
>
> --
> Mit freundlichen Grüßen
> Dietrich Streifert
> --
> Visionet GmbH
> Firmensitz: Am Weichselgarten 7, 91058 Erlangen
> Registergericht: Handelsregister Fürth, HRB 6573
> Geschäftsführer: Stefan Lindner
>
>
>
>
> -------------------------------------------------------------------------
> 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
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel