Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1217] TextField with proxy property causes compile error as ItemTemplate

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2015-01-30T17:10:10.000+0000
Affected Version/sAlloy 1.5.1
Fix Version/sAlloy 1.7.0
ComponentsTooling, XML
LabelsTCSupportTriage
ReporterNick DiZazzo
AssigneeTim Poulsen
Created2014-12-30T00:53:24.000+0000
Updated2018-03-07T22:28:29.000+0000

Description

Attachments

FileDateSize
Screen Shot 2015-01-12 at 2.42.08 PM.png2015-01-12T19:49:58.000+0000160954

Comments

  1. Nick DiZazzo 2014-12-30

    Relates to ALOY-923
  2. Tim Poulsen 2015-01-12

    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}
  3. Tim Poulsen 2015-01-30

    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.
  4. Eric Merriman 2018-03-07

    Closing as invalid. If this is incorrect, please reopen.

JSON Source