[ALOY-1217] TextField with proxy property causes compile error as ItemTemplate
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2015-01-30T17:10:10.000+0000 |
Affected Version/s | Alloy 1.5.1 |
Fix Version/s | Alloy 1.7.0 |
Components | Tooling, XML |
Labels | TCSupportTriage |
Reporter | Nick DiZazzo |
Assignee | Tim Poulsen |
Created | 2014-12-30T00:53:24.000+0000 |
Updated | 2018-03-07T22:28:29.000+0000 |
Description
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2015-01-12 at 2.42.08 PM.png | 2015-01-12T19:49:58.000+0000 | 160954 |
Relates to ALOY-923
I'm not sure what your goal is here. ListViews are data oriented components, and are unlike tables in that you have limited access to child View components. Because of that, it would be challenging to do anything useful with a text field toolbar. See the attached screen, which shows the event object data available when you click on the Done button. Here's the Classic code used to create that screen: {noformat} var win = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var btns = []; btns.push(Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.CANCEL })); btns.push(Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.FLEXIBLE_SPACE })); btns.push(Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.CAMERA })); btns.push(Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.FLEXIBLE_SPACE })); var done = Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.DONE }); function doFoo(e) { console.log(e) } done.addEventListener('click', doFoo) btns.push(done); var toolbar = Ti.UI.iOS.createToolbar({ items: btns }); var myTemplate = { childTemplates: [ { type: 'Ti.UI.TextField', bindId: 'tf', properties: { keyboardToolbar: toolbar, borderStyle: Ti.UI.INPUT_BORDERSTYLE_BEZEL, keyboardToolbarColor: "#999", keyboardToolbarHeight: "40", width: "300" } } ], events: {click: doFoo } }; var listView = Ti.UI.createListView({ top: 20, templates: { 'template': myTemplate }, defaultItemTemplate: 'template' }); var sections = []; var data = []; data.push( { tf: { value: "Focus to see keyboard with toolbar"}, properties: { itemId: 1 }} ); data.push( { tf: { value: "This is another item w/text field"}, properties: { itemId: 2 }} ); data.push( { tf: { value: "And a third"}, properties: { itemId: 3 }} ); var mainsection = Ti.UI.createListSection(); mainsection.setItems(data); sections.push(mainsection); listView.sections = sections; win.add(listView); win.open(); {noformat}
Resolving as invalid. But if you have additional information, I'll be glad to re-open and look at this again. But, I think my previous comment addresses the troubles you're having.
Closing as invalid. If this is incorrect, please reopen.