Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13544] TiAPI: bubbleParent property not being set properly on both iOS and Android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-05-09T17:56:00.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sRelease 3.1.1, Release 3.2.0
ComponentsCore
Labelsandroid, bubbleParent, button, ios, qe-closed-3.1.1, qe-testadded, triage
ReporterMilt Grinberg
AssigneeIngo Muschenetz
Created2012-12-18T20:43:24.000+0000
Updated2014-06-19T12:44:14.000+0000

Description

*Problem description* the bubbleParent property is not being set correctly, on Android and iOS for creation of a button, and on iOS only when using the setter function. *Test case*
var win = Ti.UI.createWindow({
	backgroundColor : "#FFF"
});

try {
	var button1 = Ti.UI.createButton({
		bubbleParent : false,
	});
	Ti.API.info('button1 bubbleParent:false = ' + button1.getBubbleParent());
	button1.setBubbleParent(false);
	Ti.API.info('button1 setBubbleParent(false) = ' + button1.getBubbleParent());
	win.add(button1);
} catch (e) {
	Ti.API.error('button1 getBubbleParent() error:' + e);
}

win.open();
*Logs: Android*
button1 bubbleParent:false = true
button1 setBubblePrent(false) = false
*Logs: iOS*
button1 bubbleParent:false = 0
button1 setBubbleParent(false) = true

Attachments

FileDateSize
log4.txt2012-12-18T20:43:24.000+000013200
sample4.js2012-12-18T20:43:24.000+0000798

Comments

  1. Daniel Sefton 2013-01-02

    Hi Milt, Would you mind fleshing out the test case a bit, with the table view and window creation etc. so that we can just drop it into a project? Could you also state the Android device/emulator and OS version that you're working with? Thanks!
  2. Daniel Sefton 2013-04-12

    Tested and confirmed with 3.1 CI (3.1.0.v20130410180128) with iOS 6 simulator and Samsung Galaxy S2 Android 2.3.6. Different behavior on iOS and Android - both platforms broken. The only method that works is setBubbleParent() on Android only.
  3. Ping Wang 2013-04-12

    Right now on Android, the bubbleParent property can not be set during creation of the proxy. It can only be set through
       proxy.bubbleParent=true/false
       
    or
       proxy.setBubbleParent(boolean)
       
  4. Daniel Sefton 2013-04-12

    So... do the docs explain this? Is the reason for it an underlying issue with code architecture? Now we need to establish why using setBubbleParent() doesn't work on iOS.
  5. Federico Casali 2013-05-30

    Verified as fixed and working as expected, including the 'setBubbleParent()' method. Sample code:
       var win = Ti.UI.createWindow({
           backgroundColor : "#FFF"
       });
        
       try {
           var button1 = Ti.UI.createButton({
               bubbleParent : false,
           });
           Ti.API.info('button1 bubbleParent:false = ' + button1.getBubbleParent());
           button1.setBubbleParent(true);
           Ti.API.info('button1 setBubbleParent(true) = ' + button1.getBubbleParent());
           win.add(button1);
       } catch (e) {
           Ti.API.error('button1 getBubbleParent() error:' + e);
       }
        
       win.open();
       
    It returns on both iOS and Android: button1 bubbleParent:false = false button1 setBubbleParent(true) = true Environment: Appcelerator Studio 3.1.1.201305292130 Titanium SDK 3.1.1.v20130529114554 Alloy 1.1.3-alpha Titanium-Code-Processor 1.1.3-alpha3 Closing.

JSON Source