Macadamian/titanium_mobile — pull request #145 by Harutyun (2012-08-31 13:00:28+00:00)
Title: TIMOB-10717: Blackberry: Implement Titanium.UI.TextField value property

Reviewers: JPL

ChangeLog:
- implemented value property for the textField control

Test Cases:
- make sure you can successfully build tibb and tibbtest
- run the above snippet of code and make sure value property, and
get/setValue functions are working

var win1 = Titanium.UI.createWindow({
backgroundColor:'#FF0'
});

var textField = Ti.UI.createTextField({
top: 0,
left: 0
});

textField.addEventListener('change',function(e)
{
Titanium.API.info("Text is :" + e.value);
});

var button1 = Titanium.UI.createButton({
title: 'SET TEXT',
top: 150,
left: 0
});

button1.addEventListener('click',function(e)
{
textField.setValue("SOMETHING");
Titanium.API.info("You clicked the button");
});

var button2 = Titanium.UI.createButton({
title: 'GET TEXT',
top: 300,
left: 0
});

button2.addEventListener('click',function(e)
{
Titanium.API.info("Got following value:" + textField.getValue());
});

win1.add(textField);
win1.add(button1);
win1.add(button2);

win1.open();