});
widget.createChoiceElement = function(sb, value) {
- var m = value.match(/^(0x[0-9a-f]{1,2}|[0-9]{1,3})$/),
- p = lookupProto(lookupProto(m ? +m[1] : value)[0]);
+ var p = lookupProto(value);
return ui.Dropdown.prototype.createChoiceElement.call(this, sb, p[2], p[1]);
};
var m = value.match(/^(0x[0-9a-f]{1,2}|[0-9]{1,3})$/),
p = lookupProto(m ? +m[1] : value);
- return (p[0] > -1) ? p[2] : value;
+ return (p[0] > -1) ? p[2] : p[1];
});
+ values.sort();
+
return ui.Dropdown.prototype.createItems.call(this, sb, values.join(' '));
};