Hey,
that totally sounds like a bug to me. Usually, the binding has a fallback which
checks the property definition for the event name and should use this. I did a
quick test in the playground and it seems to work in a basic setup:
qx.Class.define("A", {
extend : qx.core.Object,
properties : {
a : {
init: "xyz",
event: "affe"
}
}
});
var label = new qx.ui.basic.Label("test");
this.getRoot().add(label);
var a = new A();
a.bind("a", label, "value");
a.setA("XYZ");
Could you perhaps change the code to fail? Thats something that should work
just out of the box so we should figure out how to reproduce it and open up a
bug for that.
Regards,
Martin
Am 09.10.2010 um 18:55 schrieb Greg Beaver:
> aho wrote:
>> hi all,
>>
>> i am trying to get the names of my custom class into a list. I followed the
>> great examples and documentation, but still this error remains:
>>
>> uncaught exception: No event could be found for the property: source
>>
> Hi,
>
> I have run into this many times before. I actually think it is a bug in
> qooxdoo, but the problem is the name of your event, which is
> "sourcechanged." The event must be named "changeSource" for qooxdoo to
> find it in bindings. Better, of course, would be for qooxdoo to use the
> event name you define, but for some reason it simply takes the property
> name, uppercases the first letter and prepends "change."
>
> You don't need to define the event or the setter, they will be
> automatically created if you use a property. Your code should look like:
>
> qx.Class.define("test.Map",
> {
> extend: qx.core.Object,
> construct : function()
> {
> },
> properties:{
> source :
> {
> check : "String",
> init : null,
> nullable : true,
> apply : "setSource",
> event: "changeSource",
> themeable : true
> }
> }
> });
>
>
> var Map1 = new test.Map();
> Map1.setSource("Map 1");
>
> var Map2 = new test.Map();
> Map2.setSource("Map2");
> var maps =[Map1, Map2];
>
> var armaps = new qx.data.Array(maps);
> var lstexmaps = new qx.ui.form.List();
> var control = new qx.data.controller.List(armaps, lstexmaps,"source");
>
>
>
> Greg
>
>> I thought my mistake is in my class definition because of this event
>> message, but i couldn't check it with the example, because there is no code
>> for the custom class available... and i couldn't understand what that
>> message exactly means...
>>
>> So maybe you could help me... here is some of my code:
>>
>> first of all the class:
>>
>> qx.Class.define("test.Map",
>> {
>> extend: qx.core.Object,
>> construct : function()
>> {
>> },
>> properties:{
>> source :
>> {
>> check : "String",
>> init : null,
>> nullable : true,
>> apply : "setSource",
>> event: "sourcechanged",
>> themeable : true
>> }
>> },
>> members:
>> {
>> setSource : function(value) {
>> this.source=value;
>> }
>> },
>> events :
>> {
>> "sourcechanged": "qx.event.type.Event"
>> }
>> });
>>
>> and here the list:
>>
>> var Map1 = new test.Map();
>> Map1.setSource("Map 1");
>>
>> var Map2 = new test.Map();
>> Map2.setSource("Map2");
>> var maps =[Map1, Map2];
>>
>> var armaps = new qx.data.Array(maps);
>> var lstexmaps = new qx.ui.form.List();
>> var control = new qx.data.controller.List(armaps, lstexmaps,"source");
>>
>>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel