TIMOB-10226: BlackBerry: Build script trigger wrong build type

Reviewers: JP

Changelog:
- Add the VARIANTLIST to make command.

Test cases:
- Build the mobile sdk.
- Create project using project.py.
- Build it with builder.py using different build types (simulator, device, deploy).
- Make sure it builds with correct build type.

NOTE: Will fail to build with build type 'deploy' due to known issue with R6.
TIMOB-10163: BlackBerry: Add BlackBerry to anvil test harness app

[Issues Fixed]
TIMOB-10163: BlackBerry: Add BlackBerry to anvil test harness app
TIMOB-10230: BlackBerry: App.Properties: Can't set same key twice

[Changes]
includes.js
- added BlackBerry text where appropriate

platform.js
- added check for BlackBerry runtime

android/tiapp.xml, android_calendar/tiapp.xml, app/tiapp.xml, default/tiapp.xml, includes/tiapp.xml
- added BlackBerry schema

exampleConfig.js
- added BlackBerry port

android.js, ios.js, mobileweb.js
- fix running python process on Windows

NativeSimpleDBInterface.cpp
- use REPLACE instead of INSERT to replace the simpleValue if the simpleKey exists

[Tests]
Test 1: Force creation of test harness
1) Add blackberry to the platforms in android.js's buildHarness function
2) Start anvil for android and run a test
3) Stop the test once the test harness is created and verify it contains the blackberry files
4) Manually build and run the test harness for blackberry
5) Verify there are no errors and it runs
Note: It will crash due to Socket not being implemented

Test 2: Set more than once using Ti.App.Properties
1) Create a project and write code in app.js to set the same property multiple times
2) Build, package, and run the app
3) Verify the app doesn't crash and the property was successfully written multiple times
TIMOB-10226: BlackBerry: Build script trigger wrong build type ver2

Reviewers: JP

Description:
 "blackberry\builder.py run -t device" command triggers Device-Release build, while should trigger Device-Debug.
 Setup the VARIANT_LIST macro (defined from qrules.mk) within make command to direct it to the proper build.

Changelog:
- Minor change.

Test cases:
- Build the mobile sdk.
- Create project using project.py.
- Build it with builder.py using different build types (simulator, device, deploy).
- Make sure it builds with correct build type.

NOTE: Will fail to build with build type 'deploy' due to known issue with R6.
Merge pull request #118 from alexandergalstyan/buildScriptBranch

TIMOB-10226: BlackBerry: Build script trigger wrong build type
TIMOB-10272: BlackBerry: Finish size and position methods / properties

Reviewers: Davic C.

ChangeLog:
- implemented following functions for UI.View:
getBottom, getRight, getRect and getSize
setBottom, setRight

Test Cases:
- make sure you can successfully build tibb and tibbtest
- run the above snippet of code and make sure getters for
controllers are working correctly

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

var label1 = Ti.UI.createLabel({
text: 'hello',
top: 200,
height: 300
});

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

button.addEventListener('click',function(e)
{
Titanium.API.info("You clicked the button");
var j = label1.getRect();
Titanium.API.info("j.height = " + j.height);
Titanium.API.info("j.width = " + j.width);
Titanium.API.info("j.x = " + j.x);
Titanium.API.info("j.y = " + j.y);
var s = label1.getSize();
Titanium.API.info("s.height = " + s.height);
Titanium.API.info("s.width = " + s.width);
Titanium.API.info("s.x = " + s.x);
Titanium.API.info("s.y = " + s.y);
});

var button1 =
Titanium.UI.createButton({
title: 'change
postion',
top: 400,
});

var a = 100;
var b = 130;
button1.addEventListener('click',function(e)
{
Titanium.API.info("You clicked the button");
label1.left = b;
label1.top = b;
label1.height = a;
label1.width = a;
a += 10;
b += 5;
});

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

							    win1.open();
TIMOB-10271: Implement getZIndex on UI View
Reviewer: JP

Change Log:
- added setZIndex and getZIndex properties to NativeControlObject
- added zIndex to TiUIBase
- modified tibbtest/app.js to test zindex

Test Cases:
- build tibb
- build tibbtest
- run tibbtest
- a blue label at the top should display zindex of 'Button 1' and 'Button 2'
- default value should be 'undefined'
- push 'Push Me' button
- button 1 should overlap button 2
- label at top should display:
  'ZIndex of button 1=200, ZIndex of button 2=undefined'
- push 'Push Me' button again
- button 2 should overlap button 1
- label at top should display:
  'ZIndex of button 1=200, ZIndex of button 2=500'

https://jira.appcelerator.org/browse/TIMOB-10271
TIMOB-9665 Blackberry: fix property enumeration on JS object created by the framework

Reviewer: DC

The lookup of inherited methods such as toString() was broken for Ti instances that we create, resulting in a crash.
The cause is that by returning undefined in the lookup the V8 internal lookup was not invoked.

Changelog:
- Return an empty value handle when not finding a keyword in our framework
- Protect the TiUIBase initializeTiObject so that it can be called from derived classes without negative effects.
- Reverted the calls from derived classes to call in their direct parent

Tests:
Built for simulator, verified that passing a Ti object to a function that expects a string, ends up invoking the toString on the object and it doesn't crash the JS anymore.
=> verified that the event callbacks are not broken by the change
=> Using breakpoints, verified that the prop_setter function is still getting called with the change
Merge pull request #120 from dlifshitz-maca/TIMOB-10163_01

TIMOB-10163: BlackBerry: Add BlackBerry to anvil test harness app
Addressed comment
TIMOB-10161: BlackBerry: Implement Ti.Buffer for Anvil [Partial implementation]

Reviewers: DavidL

Changelog:
- Added NativeBufferObject class to represent Buffer natively.
- Added TiBufferObject class to represent the v8 object.
- Added properties byteOrder, length, type, value.
- Added Ti.Buffer methods.
- Implemented clear() method, length, value (partially) properties for Ti.Buffer.

Test cases:
- Use the following snippet to test current functionality.
- Make the buffer length changed after the clear() method called.

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

var buffer = Ti.createBuffer({ value: "hello world" });
Ti.API.info('+++++++++++++++++++++++++' + buffer.length + '+++++++++++++++++++++++++');
buffer.clear();
Ti.API.info('+++++++++++++++++++++++++' + buffer.length + '+++++++++++++++++++++++++');

win1.open();
Added fix for zorder when not added to parent
TIMOB-10161: BlackBerry: Implement Ti.Buffer for Anvil [Partial implementation part2]

Reviewers: DavidL

Changelog:
- Added TiCodecObject class.
- Updated apidoc.
- Address comments.
- Fix unused variables warnings.
- Implement fill(), toString() methods, byteOrder property.
- Added prototypes for TiCodeObject methods.

Test cases:
- Use the following snippets to test current functionality.
- Make the buffer length changed after the clear() method called.

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

var buffer = Ti.createBuffer({length:9, value:110000011});
Ti.API.info('Before: ' + buffer.toString());
buffer.fill(6, 2, 5);

Ti.API.info('After: ' + buffer.toString());

//var buffer = Ti.createBuffer({ value: "hello world" });
//Ti.API.info('+++++++++++++++++++++++++' + buffer.length + '+++++++++++++++++++++++++');
//buffer.clear();
//Ti.API.info('+++++++++++++++++++++++++' + buffer.length + '+++++++++++++++++++++++++');

win1.open();
Merge pull request #122 from Harutyun/TIMOB-10272

TIMOB-10272: BlackBerry: Finish size and position methods / properties
TIMOB-10161: BlackBerry: Implement Ti.Buffer for Anvil [Partial implementation part3]

Reviewers: DavidL

Changelog:
- Updated apidoc.
- Address comments.
- Implement copy(), append(), insert(), clone() methods.

Test cases:
- Use the snippets attached to JIRA to test current functionality.
Merge pull request #124 from jpl-mac/timob-9665

TIMOB-9665 Blackberry: fix property enumeration on JS object created by ...
TIMOB-10161: BlackBerry: Implement Ti.Buffer for Anvil [Partial implementation part4]

Reviewers: DavidL

Changelog:
- Address comments.

Test cases:
- Use the snippets attached to JIRA to test current functionality.
Fixed zindex issues
TIMOB-10161: BlackBerry: Implement Ti.Buffer for Anvil [Partial implementation part5]

Reviewers: DavidL

Changelog:
- Address comments.

Test cases:
- Use the snippets attached to JIRA to test current functionality.
Merge pull request #125 from alexandergalstyan/bufferBranch

TIMOB-10161: BlackBerry: Implement Ti.Buffer for Anvil [Partial implementation]
Merge pull request #123 from dcampbell-macadamian/TIMOB-10271

TIMOB-10271: Implement getZIndex on UI View