Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-788

iOS: rightButton for TextField doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Alloy 1.2.1
    • Fix Version/s: Alloy 1.3.0, 2013 Sprint 23
    • Component/s: None
    • Environment:

      Macbook Pro, OSX 10.7.5, iOS Simulator v. 6.0 (369.2). Ti: 3.1.1 GA

      Description

      Problem
      rightButton for TextField doesn't work. XML structure has to look like the following (Similar like a HeaderView under a TableView):

      Alloy test case

       
      <Alloy>
        <Window> 
          <TextField>
            <RightButton>
              <Button />
            </RightButton>
          </TextField>
        </Window>
      </Alloy>
      

      Error

      Invalid method (createRightButton) passed to UIModule

      Note
      Yes we can use a workaround, but I have to use a controller for this and it's a mess.

      Standard test case

      var win = Ti.UI.createWindow({
      	backgroundColor : 'white'
      });
       
      var rightButton = Titanium.UI.createButton({
      	color : '#FF0000',
      	title : 'Hello'
      });
       
      rightButton.addEventListener('click', function() {
      	alert("rightButton clicked");
      });
       
      var textField = Ti.UI.createTextField({
      	borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
      	color : '#336699',
      	top : 10,
      	left : 10,
      	width : 250,
      	height : 40,
      	rightButton : rightButton
      });
       
      win.add(textField);
      win.open();

        Attachments

          Activity

            People

            • Assignee:
              tlukasavage Tony Lukasavage
              Reporter:
              dsefton Daniel Sefton
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code