Macadamian/titanium_mobile — pull request #126 by Harutyun (2012-08-06 11:05:12+00:00)
Title: TIMOB-10270: BlackBerry: Implement getWidth, getHeight in UI View

Reviewers: Davic C.

ChangeLog:
- keep the top, left, height, width, right, left etc properties as JS
properties

Test Cases:
- make sure you can successfully build tibb and tibbte
- run the above snippet of code and make sure right values are printed
for the get, left, etc. positional properties

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

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

var label1 = Ti.UI.createLabel({
text: 'hello',
width: "200in",
height: "100mm",
left: "10px",
top: "20",
bottom: "345dip",
right: "211pt",
});

var button = Titanium.UI.createButton({
title: 'print position',
top: 300
});

button.addEventListener('click',function(e)
{
Titanium.API.info("You clicked the button");
Titanium.API.info("Height = " + label1.getHeight());
Titanium.API.info("Width = " + label1.getWidth());
Titanium.API.info("Top = " + label1.getTop());
Titanium.API.info("Left = " + label1.getLeft());
Titanium.API.info("Right = " + label1.getRight());
Titanium.API.info("Bottom = " + label1.getBottom());
});

win1.add(label1);
win1.add(button);

win1.open();