I know you hate the impossible to remember constants. I happen to be thinking about it and thought of one possible solution.
We could do something similar for tiOptions as we have for renamed tiEvents. As an example, in SCTi.Button's tiOptions we could have style:styleContstant.
Then we could define styleConstant as a SproutCore computed property within SCTi.Button:
styleContstant: function() {
var style = this.get('style'),
styleConstant = Titanium.UI.iPhone.SystemButtonStyle.PLAIN;
// Handle whether style was already given as a constant
// Handle converting a simple string like 'done' to the constant Titanium.UI.iPhone.SystemButtonStyle.DONE
// Handle differences between iPhone and Android
return styleConstant;
}.property('style').cacheable()
Constants would be handled as usual and easy to remembered shortcuts could be used easily as well!
I know you hate the impossible to remember constants. I happen to be thinking about it and thought of one possible solution.
We could do something similar for
tiOptions
as we have for renamedtiEvents
. As an example, inSCTi.Button
'stiOptions
we could havestyle:styleContstant
.Then we could define
styleConstant
as a SproutCore computed property withinSCTi.Button
:Constants would be handled as usual and easy to remembered shortcuts could be used easily as well!