Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20008] iOS: Rename AlertDialog placeholder properties to hintText

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2016-03-30T06:14:21.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sRelease 5.4.0
ComponentsiOS
Labelsqe-5.4.0
ReporterFokke Zandbergen
AssigneeAngel Petkov
Created2015-11-17T19:04:19.000+0000
Updated2016-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).

Comments

  1. Fokke Zandbergen 2016-02-15

    [~hansknoechel] I rolled back your change. Please note that AlerDialog has several *placeholder properties which should not share the same hintText.
  2. Angel Petkov 2016-03-28

    [~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.
  3. Fokke Zandbergen 2016-03-29

    Sorry, corrected the description. The AlertDialog has placeholder, loginPlaceholder and passwordPlaceholder but in other APIs we use hintText. So these properties should be renamed to hintText, loginHintText and passwordHintText.
  4. Angel Petkov 2016-03-29

    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();
       
  5. Harry Bryant 2016-06-21

    Verified as fixed, hintText , loginHintText , & passwordHintText are now supported properties with AlertDialog. Using placeholder , loginPlaceholder & passwordPlaceholder now 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.*

JSON Source