Okay, there is at least one more fallacy. If I add a method like the
following to the DateWrapper to increase the date by x days, the
label-binding wouldn't call the converter because the wrong key is listened.
But if I am setting the binding-key to gameData.date.date, the converter
would run but fail because the data-value is the date-property itself which
has no getFormattedDate-function...

The changed DateWrapper-class for completeness:

qx.Class.define("mkss.data.DateWrapper", {
    extend: qx.core.Object,
    properties: {
        date: {
            check: "Date",
            event: "changeDate"
        }
    },
    construct: function (date, format) {
        this.base(arguments);        
        this.setDate(date);        
        this.dateFormat = new qx.util.format.DateFormat(format);
        this._intDateFormat = new qx.util.format.DateFormat("yyyy-MM-dd");
    },
    members: {        
        getFormattedDate: function () {
            return this.dateFormat.format(this.getDate());
        },
        addDays: function (incDays) {
            // found here: http://jsfiddle.net/sparebytes/XrWzq/
            
            var tmpDate = new Date(this.getDate());
            tmpDate.setDate(this.getDate().getDate() + incDays);
            this.setDate(tmpDate);
        }
    }
});



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Is-it-possible-to-add-another-object-to-the-converter-for-a-singlevalue-binding-tp7588266p7588269.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to