{ "id": "61401", "key": "TIMOB-769", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:11.000+0000", "created": "2011-04-15T02:36:00.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "apidoc", "documentation" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:11.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

showCancel is being ignored - the cancel button is shown on\nfocus of the search bar

\n

search bar also hides after row selection even when searchHidden\nis false. if searchHidden is false, the search bar should be always\nvisible.

{html}", "attachment": [], "flagged": false, "summary": "searchBar issues", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123984", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Part (2) seems to be false (a 'works for me'). Part (1) might be\nillegal; the 'cancel' button stops the search and unloads the table\nview. Even if showsCancel is set to 0 on the search bar, the table\nseems to want to display it anyway. Would have to look more into\nit.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:00.000+0000", "updated": "2011-04-15T02:36:00.000+0000" }, { "id": "123985", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

First part of the bug is, in fact, illegal.\nUISearchDisplayController autosets the showsCancelButton to YES,\nand although we can cache the original value, set it, and\nredisplay, the 'cancel' button still shows up for a second,\ncreating an inconsistent (and ugly) UI. We'll just have to say that\nthis is a misfeature.

\n

Second part is still a 'works for me.'

\n

Marking as invalid. Please inform me if there are additional\nproblems.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:00.000+0000", "updated": "2011-04-15T02:36:00.000+0000" }, { "id": "123986", "author": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

run this example:

\n

it does look like the hide went away. but the showCancel:false\nis not working and now search does not seem to work - i.e., the\nresults are not limited by matching rows

\n

var win = Titanium.UI.createWindow();

\n

// create table view data object var data = [];

\n

data[0] = Ti.UI.createTableViewRow({hasChild:true,title:'Row\n1'});
\ndata[1] = Ti.UI.createTableViewRow({hasDetail:true,title:'Row\n2'});
\ndata[2] = Ti.UI.createTableViewRow({hasCheck:true,title:'Row\n3'});
\ndata[3] = Ti.UI.createTableViewRow({title:'Row 4'});

\n

var search = Titanium.UI.createSearchBar({

\n
\nbarColor:'#385292',\nshowCancel:false\n
\n

}); search.addEventListener('change', function(e)
\n{ e.value // search string as user types });\nsearch.addEventListener('return', function(e)
\n{ search.blur(); }); search.addEventListener('cancel',\nfunction(e)
\n{ search.blur(); });

\n

// create table view var tableview =\nTitanium.UI.createTableView({

\n
\ndata:data,\nsearch:search,\n
\n

});

\n

// create table view event listener\ntableview.addEventListener('click', function(e)
\n{

\n
\n// event data\nvar index = e.index;\nvar section = e.section;\nvar row = e.row;\nvar rowdata = e.rowData;\nTitanium.UI.createAlertDialog({title:'Table View',message:'row ' + row + ' index ' + index + ' section ' + section  + ' row data ' + rowdata}).show();\n
\n

});

\n

win.add(tableview);
\nwin.open();

{html}", "updateAuthor": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:00.000+0000", "updated": "2011-04-15T02:36:00.000+0000" }, { "id": "123987", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

You're right, search doesn't appear to work - but this might be\na more general issue where search just doesn't work (meaning it\ncould have difficulty pulling certain information out of a\ntableview; I'd have to look into it). Feel free to create a bug for\nthis and I'll look into it.

\n

As mentioned above, setting showCancel:false is overridden by\nthe UISearchDisplayControl for (probably bad) reasons, but it's set\nat a point before we can interact with the search bar and clear the\n'cancel' button out - and the button is already displayed at this\npoint. This creates an ugly UI inconsistency where the search bar\nappears to have a 'cancel' option, but then suddenly doesn't. I can\nchange this if you'd like.

\n

There might be an undocumented API for this but undocumented\nAPIs are bad juju. Keeping the bug 'invalid' until we've got an\nanswer.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:01.000+0000", "updated": "2011-04-15T02:36:01.000+0000" }, { "id": "123988", "author": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

the search within the table view has always worked - so\nsomething has changed recently (since 1.2.0) to break it.

\n

the showCancel problem is also a new problem (since 1.2.0).

\n

both need to be addressed

{html}", "updateAuthor": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:01.000+0000", "updated": "2011-04-15T02:36:01.000+0000" }, { "id": "123989", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Reopening. Didn't see Nolan's comment earlier in the month.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:01.000+0000", "updated": "2011-04-15T02:36:01.000+0000" }, { "id": "123990", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Okay, this really does appear to have been fixed now. I tested\nNolan's JS and it worked.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:01.000+0000", "updated": "2011-04-15T02:36:01.000+0000" }, { "id": "123991", "author": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

searchHidden parameter work but it is still not documented on\nofficial API !

\n

Check: \nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI....

{html}", "updateAuthor": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:02.000+0000", "updated": "2011-04-15T02:36:02.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }