Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Cannot Reproduce
-
Affects Version/s: None
-
Fix Version/s: 2013 Sprint 03
-
Labels:
-
Environment:
Alloy 3.0.1 (I think, not sure how to find version)
Description
If you create a TableView in an Alloy View, and then populate it with TableViewRow's which are created from Alloy view files, then click events are not passed to the parent. NOTE: if you create rows in dynamically in code or pre-defined in the TableView.xml file, then click events are passed.
ref: Q&A
code to reproduce:
index.xml
index.xml |
<Alloy>
|
<Window>
|
<TableView id="jobsTable" onClick="rowWasClicked">
|
<TableViewSection id="activeSection" headerTitle="Current jobs"/>
|
<TableViewSection id="futureSection" headerTitle="Future jobs">
|
|
</TableViewSection>
|
</TableView>
|
</Window>
|
</Alloy>
|
testRow.xml
(.js and .ts files are blank)
<Alloy>
|
<TableViewRow id="row">
|
<View id="view" backgroundColor="red" width="20" height="20" />
|
</TableViewRow>
|
</Alloy>
|
index.js
index.js |
|
function rowWasClicked(e) {
|
alert('you pressed me');
|
}
|
|
for (var i = 0; i < 5; i++) {
|
//$.activeSection.add(Ti.UI.createTableViewRow({title: 'row ' + (i+1)}));
|
|
var args = {};
|
var row = Alloy.createController('testRow', args).getView();
|
//row.bubbleParent = true;
|
|
$.activeSection.add(row);
|
|
}
|
|
$.index.open();
|
notes
(tableViewRow.xml is code I took from the TableViewRow online doc.)
If I remove the View (in the row), it works perfectly. If the View is in place, then only the 1st row responds to taps. (Using the iOS simulator.) The other rows are silent. It seems that other elements (<Label/>) etc don't seem to cause a problem.
And again, my table works perfectly IFF I don't use sections.
I also found the behavior (good or bad) doesn't always respond to my changes in the code unless I do a 'project clean'.
I also tried forcing $.view.bubbleParent = true but that didn't help anything.
Please let me know if you need more info or test cases.
Attachments
Issue Links
- is duplicated by
-
ALOY-492 Events are blocked in special cases in TableViewSection
-
- Closed
-