[TIMOB-20008] iOS: Rename AlertDialog placeholder properties to hintText
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-03-30T06:14:21.000+0000 |
| Affected Version/s | Release 5.1.0 |
| Fix Version/s | Release 5.4.0 |
| Components | iOS |
| Labels | qe-5.4.0 |
| Reporter | Fokke Zandbergen |
| Assignee | Angel Petkov |
| Created | 2015-11-17T19:04:19.000+0000 |
| Updated | 2016-06-21T17:29:46.000+0000 |
Description
The new
*placeholder properties for the [AlertDialog](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.AlertDialog-property-placeholder) should be renamed to *HintText as that is the name we use on all other API's like [TextArea](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.TextArea-property-hintText).
[~hansknoechel] I rolled back your change. Please note that AlerDialog has several *placeholder properties which should not share the same hintText.
[~fokkezb] Hi Fokke i check all of our APIs none of them have a property called placeholderHintText ? Did you mean just hintText ? As the textArea widget doesn't have a placeholder property according to the docs.
Sorry, corrected the description. The AlertDialog has
placeholder,loginPlaceholderandpasswordPlaceholderbut in other APIs we usehintText. So these properties should be renamed tohintText,loginHintTextandpasswordHintText.PR : https://github.com/appcelerator/titanium_mobile/pull/7893 Demo Code :
var win = Ti.UI.createWindow({ title: 'Click window to test', backgroundColor: 'white', exitOnClose: true, fullscreen: false }); var placeholder = Titanium.UI.createButton({ title: 'Plain placeholder', top: 10, left: 10, width: Ti.UI.SIZE, height: Ti.UI.SIZE }); placeholder.addEventListener('click',function(e) { var dialog = Ti.UI.createAlertDialog({ message: 'Would you like to delete the file?', title: 'Delete', style: Titanium.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT, placeholder:"The one" }); dialog.show(); }); var loginPlaceholder = Titanium.UI.createButton({ title: 'Full login placeholder', top: 10, left: 150, width: Ti.UI.SIZE, height: Ti.UI.SIZE }); loginPlaceholder.addEventListener('click',function(e) { var dialog = Ti.UI.createAlertDialog({ buttonNames: ['Confirm', 'Cancel', 'Help'], message: 'Would you like to delete the file?', title: 'Delete', style: Titanium.UI.iOS.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT, loginPlaceholder:"The One", passwordPlaceholder:"The Second" }); dialog.show(); }); win.add(placeholder); win.add(loginPlaceholder); win.open();Verified as fixed,
hintText,loginHintText, &passwordHintTextare now supported properties with AlertDialog. Usingplaceholder,loginPlaceholder&passwordPlaceholdernow return Deprecated messages to the console. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160617074028 Appc Studio: 4.7.0.201606150733 Appc NPM: 4.2.7-2 App CLI: 5.4.0-18 Xcode 7.3 Node v4.2.6 *Closing ticket.*