[TIMOB-23365] Windows: Alloy, Unable to Bind to Visible Tag on Windows 8.1 & Windows 10
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-06-03T21:05:18.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Release 5.4.0 |
Components | Windows |
Labels | n/a |
Reporter | Dee Clawson |
Assignee | Gary Mathews |
Created | 2016-05-09T20:56:54.000+0000 |
Updated | 2016-07-04T18:17:07.000+0000 |
Description
Problem
In iOS & Android applications we bind to the visible tag on tables, table view rows, labels, buttons, textfields, textareas, views etc. This does not work on Windows 8.1 or Windows 10. When attempting to bind to the visible tag the items always show.Test case
Example code is attached. Will output a table as displayed below: !http://i.imgur.com/dtKSrK6.png!Discussions
I would expect the same functionality as iOS & Android on Windows.Attachments
File | Date | Size |
---|---|---|
exampleCollection.js | 2016-05-10T14:06:34.000+0000 | 864 |
index.js | 2016-05-10T14:06:25.000+0000 | 2441 |
index.xml | 2016-05-10T14:06:41.000+0000 | 934 |
Hello [~kdclaw3@gmail.com], Thanks for reporting. It will be appreciated if you provide full test code for reproducing this issue. We will recognize this as bug when we are able to reproduce this. Thanks in advance
@nsalahin Full code to reproduce the bug is attached.
Thanks [~kdclaw3@gmail.com]. We really appreciate your contribution.
Hello, I am able to reproduce this issue with given code and given step. *Steps:* 1. Create a default alloy project for windows phone. 2. Replace index.xml and index.js file with given one. 3. Paste exmapleCollection.js file in models folder. 4. Build and run the app. For an empty index.tss file following screen is produced. [Screenshot](https://i.imgsafe.org/758b5fe.png) Thanks *Environment*: *OS :* Microsoft Windows 8.1 Enterprise N *Device info:* Microsoft Lumia 640 (Windows Phone 8.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0.v20160429102159 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
Can we get a status on this issue. This is holding us up from going live with windows.
Gary can you take a quick look to get an idea of the scope of this fix? I can't tell quickly if this is a Windows SDK issue, or an Alloy issue, or what.
[~kdclaw3@gmail.com] What version of Alloy are you using? [~fokkezb] I see that alloy's data binding was refactored for 1.9.0. Any ideas on where to start looking for who to fix this? Not sure why it'd be specific to Windows...
I've taken a look, there seems to be a problem with the way the boolean value is being interpreted. The JSValue interprets it as a string, this means casting the JSValue to a boolean always returns
true
. This is also why the assert returns a warning.I'll take a look into why this is happening.
Sounds like the same root issue as TIMOB-23216, which Fokke linked to ALOY-1355 and ALOY-1480
PR: https://github.com/appcelerator/HAL/pull/62
I think that is the wrong solution. Javascript has some surprising behavior around coercing a String to a Boolean, where "false" actually becomes true. I think the root cause may have been bugs in Alloy itself where they were turning booleans into strings. What version of Alloy are you guys using? This should be fixed in Alloy 1.9.0 according to the linked tickets.
I'm using Alloy 1.8.5, I will try Alloy 1.9.0.
*UPDATE* [~cwilliams] Re-tried using Alloy 1.9.0, the issue has been fixed! However, Android re-interprets boolean strings "true" and "false" as their boolean value. I have yet to test this on iOS.
Fixed by Alloy 1.9.0 - https://github.com/appcelerator/alloy/pull/780 I will mark this ticket as resolved.
Verified using: Windows 10 Pro Ti SDK: 5.4.0.v20160704082523 Appc NPM: 4.2.7-2 Appc CLI: 5.4.0-25 Appc Studio: 4.7.0.201606220541 Using the code example provided the output is as expected and matches iOS and Android. Closing ticket