Problem Description
The following code demonstrates that the
systemButton
property cannot be changed after creation. This is not documented and of course it would be even better if it *could* be changed.
Testing Environment:
Titanium SDK: 3.2.3.GA and 3.3.0.GA
Titanium CLI: 3.3.0
OS X Version: 10.9.3
IOS Simulator: 7.1
TEST CODE:
app.js
var btn = Ti.UI.createButton({
systemButton : Ti.UI.iPhone.SystemButton.ADD
});
var win = Ti.UI.createWindow({
backgroundColor : 'white',
rightNavButton : btn,
title : 'Click the button'
});
var nw = Ti.UI.iOS.createNavigationWindow({
window : win
});
btn.addEventListener('click', function(e) {
//console.debug('clicked but not changed');
console.info('clicked but not changed');
btn.systemButton = Ti.UI.iPhone.SystemButton.ACTION;
});
nw.open();
STEPS TO REPRODUCE:
- Create a simple project.
- Update this code in app.js
- Run this with testing environment.
- Click to the systemButton or ADD button.
TESTING RESULT:
There is no any change in the systemButton or ADD button.
Thanks for your report! The Platform team will set the priority.
Issue reproduce Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
There is an internal constraint to not allow the system-button to be changed after creation. It is advised to change the button instead.
Closing old "Won't fix" tickets. If you disagree, please reopen.