Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15960] Blackberry: Layout Engine Vertical Layout - Error on method 'createButton'

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-12-12T18:30:16.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.2.1, Release 3.3.0
ComponentsBlackBerry
Labelsmodule_button, qe-3.2.0, qe-closed-3.2.0, qe-testadded, regression
ReporterOlga Romero
AssigneePedro Enrique
Created2013-12-11T20:48:11.000+0000
Updated2014-02-20T01:04:55.000+0000

Description

This is *regression* against 3.1.3.GA javaScript Exception
app.js:13
    return Ti.UI.createButton({
                 ^
TypeError: Object true has no method 'createButton'
    at MyButton (app.js:13:18)
    at app.js:20:16
[N_DEBUG] virtual int NativeAbstractTextControlObject::setFont(TiObject*) Line 159: Unknown value received: Bold

To reproduce run

var win = Titanium.UI.createWindow();
 
var scroll = Ti.UI.createScrollView({
    backgroundColor: '#ccc',
    width: Ti.UI.FILL,
    height: Ti.UI.FILL,
    layout: 'vertical',
    contentHeight: Ti.UI.SIZE,
    contentWidth: Ti.UI.FILL
});
 
function MyButton(title) {
    return Ti.UI.createButton({
        title: title,
        top: 10
    });
}
 
for(var i = 0; i < 100; i++) {
    scroll.add(MyButton('Button #' + (i + 1))); 
}
 
win.add(scroll);
win.open();

Expected result

You should see a scrollview with buttons layed out in vertical layout & numbered (1 - 100).

Comments

  1. Pedro Enrique 2013-12-12

    PR pending: https://github.com/appcelerator/titanium_mobile_blackberry/pull/193
  2. Olga Romero 2013-12-12

    [~penrique] thanks for the fix
  3. Pedro Enrique 2013-12-12

    Backport PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/194
  4. Olga Romero 2013-12-12

    Tested an verified the fix with: Appcelerator Studio, build: 3.2.0.201312101708 Titanium SDK, build: 3.2.0.v20131212122847 CLI 3.2.0-cr3 Alloy 1.3.0-cr BlackBerryZ10 10.1

JSON Source