Macadamian/titanium_mobile — pull request #125 by alexandergalstyan (2012-08-03 14:27:40+00:00)
Title: 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();