[TIMOB-20580] Windows: can't address to parent on windows phone
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-07T14:46:08.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | Release 5.4.0 |
Components | Windows |
Labels | children, parent, qe-5.4.0, windowsphone |
Reporter | bertelle |
Assignee | Kota Iguchi |
Created | 2016-03-03T07:15:43.000+0000 |
Updated | 2016-06-29T23:01:53.000+0000 |
Description
Hi,
on windowsphone children views can't address parent view function
Works fine on android and ios
defined as null on windowsphone
Hello, Thanks for your report. Please provide your full working environment details like SDK, CLI version etc. Also attach a simple test case and steps to reproduce this issue. Regards.
{color:#14892c}/*example code*/{color}
{color:#14892c}/*end example code*/{color} {color:red}[ERROR] : Application Error: "Runtime Error during click event: undefined is not an object (evaluating 'this.parent.setBackgroundColor')"{color}
Unless I'm mistaken, there is no "parent" property for views. I see no 'parent' property listed for Ti.UI.Button or Ti.UI.View: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Button Does this work on other platforms?
[~jnaher] Can you try and reproduce on Android/iOS? I don't think a "parent" property exists on any platform (at least not in the docs).
As said above, example code works fine on iOS and Android. I have already tried it on real devices.
https://github.com/appcelerator/titanium_mobile_windows/pull/608
Verified as fixed, test code no longer throws an error, and color change button correctly affects the backgroundColor of the parent. Tested on: Windows 10 Pro Windows Phone 10.0 (Microsoft Lumia 640 LTE) Appc Studio: 4.7.0.201606220541 Ti SDK: 5.4.0.v20160627224205 Appc NPM: 4.2.7-2 Appc Core: 5.4.0-20 Node: v4.4.4 *Closing Ticket.*