[AC-1148] Alloy generates events for 'ignored' tags.
GitHub Issue
n/a
Type
Bug
Priority
n/a
Status
Resolved
Resolution
Cannot Reproduce
Resolution Date
2014-05-19T06:42:13.000+0000
Affected Version/s
n/a
Fix Version/s
n/a
Components
n/a
Labels
n/a
Reporter
Ranando Kking
Assignee
Ritu Agrawal
Created
2014-05-02T22:25:39.000+0000
Updated
2016-03-08T07:37:30.000+0000
Description
Steps to Reproduce
Create an XML alloy view with at least 2 platform-specific layouts.
In the xml, attach the same onClick handler to a corresponding control in each of the platform-specific layouts.
Run the app and trigger the event.
Actual Result
Alloy generates event registration code for the XML portion it should have ignored as well as the portion that was intended. See the bottom of the Resources version of the controller file and you will find __defers for the XML that should have been ignored.
A controller like this will cause the problem.
With appropriate controller logic, Alloy will generate 2 event registrations instead of the single registration for the matching platform. Running the app and clicking the button or view will run both handlers.
Expected Result
Alloy should only generate event listener code for the controls that are part of the layout matching the target platform.
Please attach a simple but complete runnable test case to diagnose the issue further.
Resolving this ticket as I cannot reproduce this issue and the reporter has not provided requested information.