adamatvips
5 Dec 2011, 8:56 PM
The default behaviour of Sencha Touch for converting to boolean doesn't match that of javascript which caused some issues in our code.
Switching the BOOL function of Ext.data.Type to the code below fixed our issue and seems more intuitive.
BOOL: {
convert: function (v) {
if (this.useNull && (v === undefined || v === null || v === '')) {
return null;
return !!v;
},
sortType: st.none,
type: 'bool'
}
Any chance of getting this into Sencha Touch 2 before release?
Cheers,
Adam
Switching the BOOL function of Ext.data.Type to the code below fixed our issue and seems more intuitive.
BOOL: {
convert: function (v) {
if (this.useNull && (v === undefined || v === null || v === '')) {
return null;
return !!v;
},
sortType: st.none,
type: 'bool'
}
Any chance of getting this into Sencha Touch 2 before release?
Cheers,
Adam