[ALOY-788] iOS: rightButton for TextField doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-11-06T21:19:44.000+0000 |
Affected Version/s | Alloy 1.2.1 |
Fix Version/s | Alloy 1.3.0, 2013 Sprint 23 |
Components | n/a |
Labels | alloy, rightbutton, textfield |
Reporter | Daniel Sefton |
Assignee | Tony Lukasavage |
Created | 2013-08-10T08:46:00.000+0000 |
Updated | 2014-06-22T13:21:17.000+0000 |
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();
Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and Alloy 1.2.1. Simply drop in the XML to the default view in a new Alloy project and run it. @Tony: It looks like a feature request for the Alloy XML to me. I'm going to assume that doing
Resolved as part of ALOY-418. Additional details and testing measures can be found in there.
See ALOY-418 for resolution. Closing.