[TIMOB-19939] keyboardType should not list KEYBOARD_APPEARANCE_* constants
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-11-24T19:24:24.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.2.0 |
| Components | iOS |
| Labels | qe-5.2.0 |
| Reporter | Fokke Zandbergen |
| Assignee | Angel Petkov |
| Created | 2015-11-12T13:15:16.000+0000 |
| Updated | 2016-01-22T00:42:51.000+0000 |
Description
The different places where we have the Rename the constants for
I'm for the second option; deprecate in next 5.x and remove the old in 6.0.
That's why I've created this ticket in TIMOB instead of TIDOC.
keyboardType property all list the two KEYBOARD_APPEARANCE_* constants as valid values, although these are only valid for the appearance property.
* http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextField-property-keyboardType
* http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextArea-property-keyboardType
* http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.AlertDialog-property-keyboardType
* http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.AlertDialog-property-loginKeyboardType
* http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.AlertDialog-property-passwordKeyboardType
This is because in the YML's we use KEYBOARD_* wildcards:
https://github.com/appcelerator/titanium_mobile/search?q=KEYBOARD_*
Unless we can make exceptions we should either:
PR pending https://github.com/appcelerator/titanium_mobile/pull/7459/files Demo Code:
Expected Results : A warning stating that keyboard_twitter and keyboard_ASCII is deprecated. A warning stating that appearance is deprecated in favor of keyboardApperance.Ti.UI.setBackgroundColor('white'); var win = Ti.UI.createWindow({ title: 'Click window to test' }); var field = Ti.UI.createTextArea({ width : 300, height : 50, top : 200, right : 0 , backgroundColor : "#f0f0f0", value : "Hello", keyboardType : Titanium.UI.KEYBOARD_ASCII, appearance: Titanium.UI.KEYBOARD_APPEARANCE_LIGHT, }); var textField = Ti.UI.createTextField({ borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, color : '#336699', top : 100, right : 0, width : 250, height : 60, backgroundColor :'Green', keyboardType : Titanium.UI.KEYBOARD_TWITTER, appearance : Titanium.UI.KEYBOARD_APPEARANCE_DARK }); var search = Titanium.UI.createSearchBar({ barColor :'#000', showCancel :true, height :43, top :20, left :0, keyboardType : Titanium.UI.KEYBOARD_TYPE_URL, keyboardAppearance : Titanium.UI.KEYBOARD_APPEARANCE_DARK }); field.autocorrect = false; win.add(textField); win.add(field); win.add(search); win.open();CR + FT passed. The following logs appear as supposed to:
PR approved!Verified as fixed, with SDK
5.2.0.v20160114021251Receive DEPRECATED warning messages in console as per the expected results. Tested on: iPhone 6s Plus Device (9.2) Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.2.0.v20160114021251 Appc NPM: 4.2.2 App CLI: 5.2.0-220 Xcode 7.2 Node v4.2.3 Closing Ticket.