{ "id": "63466", "key": "TIMOB-2834", "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": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "12096", "description": "", "name": "Sprint 2012-04", "archived": true, "released": true, "releaseDate": "2012-02-26" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-02-14T23:36:44.000+0000", "created": "2011-04-15T03:30:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "barimage", "defect", "ios", "iphone", "module_navgroup", "parity", "qe-testadded", "reported-1.5.1", "reported-1.6.0", "title" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-04T22:20:19.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}

If you have a barImage in a NavigationGroup, it deletes the\r\ntitle Text on child windows, only after one child window is called.\r\nThe barImage works correctly on the parent and on the first child\r\nwindow called but not subsequent child images

\r\n

Code can be found at http://pastie.org/1461234
\r\nbarTop.png needs to be placed in the Resources directory

{html}", "attachment": [ { "id": "18226", "filename": "bartop.png", "author": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:38.000+0000", "size": 17494, "mimeType": "image/png" } ], "flagged": false, "summary": "BarImage breaks Title text in navigation group", "creator": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129509", "author": { "name": "kevinwhinnery", "key": "kevinwhinnery", "displayName": "kevinwhinnery", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Testing this example in 1.6.0 (1/17/11),\nthe first label reliably opens the second window with the correct\nbar image. The second label opens a window, but the title and\ncontent are missing missing. From here, clicking either label will\nresult in a missing title. As coded, this example would seem to be\nadding/opening windows correctly.

{html}", "updateAuthor": { "name": "kevinwhinnery", "key": "kevinwhinnery", "displayName": "kevinwhinnery", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:38.000+0000", "updated": "2011-04-15T03:30:38.000+0000" }, { "id": "129510", "author": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Some additional notes I have discovered:

\n

If you set the barImage on the parent window when the child\nopens and set the child to null, then reset the child when it\ncloses, it works right.

\n
\nsecond.addEventListener('open', function() {
\n
\n\n\n
\n
\n
\nfirst.barImage = 'barTop.png';\nsecond.barImage = null;\n
\n
\n\n\n
\n});\nsecond.addEventListener('close', function()\n{ second.barImage = 'barTop.png'; });\n\n
\nthird.addEventListener('open', function() {\n\n
\n
\nfirst.barImage = 'barTop.png';\nthird.barImage = null;\n
\n
\n\n\n
\n});\nthird.addEventListener('close', function()\n{ third.barImage = 'barTop.png'; });\n
{html}", "updateAuthor": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:39.000+0000", "updated": "2011-04-15T03:30:39.000+0000" }, { "id": "129511", "author": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

It almost seems like the barImage is created as a view and is\nthen placed over the top bar view. The back button will still work\neven though you cant see it.

{html}", "updateAuthor": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:40.000+0000", "updated": "2011-04-15T03:30:40.000+0000" }, { "id": "129512", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

I am confirming that this bug still exist. Basically, when a\nnavigation window is closed, the child window's barImage will be on\ntop of the parent's navigation bar.

\n

The example provided above shows the bug. Please refer to\nHelpdesk ticket 75181

{html}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:40.000+0000", "updated": "2011-04-15T03:30:40.000+0000" }, { "id": "129513", "author": { "name": "rodrigoknascimetno", "key": "rodrigoknascimetno", "displayName": "Rodrigo K Nascimetno", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Open /Library/Application\nSupport/Titanium/mobilesdk/osx/1.6.1/iphone/Classes
\nFind line 778 with this comment: //[barImageView\nremoveFromSuperview];
\nRemove slashes comment, example:

\n

-(void)_tabBeforeBlur { // Changed by rodrigoknascimento@gmail.com\nat 13 april 2011 - 10:35 (GMT -3) Brasil

\n
\n[barImageView removeFromSuperview];\n[super _tabBeforeBlur];\n
\n

}

\n

Delete \"build\" folder into your project and run simulator\ntrought Titanium to recreate it.

\n

Have fun.

{html}", "updateAuthor": { "name": "rodrigoknascimetno", "key": "rodrigoknascimetno", "displayName": "Rodrigo K Nascimetno", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:40.000+0000", "updated": "2011-04-15T03:30:40.000+0000" }, { "id": "129514", "author": { "name": "rafaelkellermannstreit", "key": "rafaelkellermannstreit", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thanks Rodrigo, that's very nice.

{html}", "updateAuthor": { "name": "rafaelkellermannstreit", "key": "rafaelkellermannstreit", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:30:41.000+0000", "updated": "2011-04-15T03:30:41.000+0000" }, { "id": "157691", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The code in the pastie is below (In case pastie expires the link)\r\n\r\n{code}\r\n//Here's the first window...\r\nvar first = Ti.UI.createWindow({\r\n backgroundColor:\"#fff\",\r\n title:\"My App\",\r\n barImage: 'barTop.png'\r\n});\r\nvar label = Ti.UI.createLabel({ text: \"poke me to open the next window\",top:0,height:30 });\r\nfirst.add(label);\r\n\r\nvar label2 = Ti.UI.createLabel({ text: \"poke me to open the next window\",top:40,height:30 });\r\nfirst.add(label2);\r\n\r\n//Here's the nav group that will hold them both...\r\nvar navGroup = Ti.UI.iPhone.createNavigationGroup({\r\n window:first\r\n});\r\n\r\n//Here's a window we want to push onto the stack...\r\nvar second = Ti.UI.createWindow({\r\n background:\"#fff\",\r\n title:\"Child Window\",\r\n barImage: 'barTop.png'\r\n});\r\nsecond.add(Ti.UI.createLabel({text:\"Here's the child\", color: '#000000'}));\r\n\r\n//Here's a window we want to push onto the stack...\r\nvar third = Ti.UI.createWindow({\r\n background:\"#fff\",\r\n title:\"Second Child Window\",\r\n barImage: 'barTop.png'\r\n});\r\nsecond.add(Ti.UI.createLabel({text:\"Here's the child\", color: '#000000'}));\r\n\r\n//When the label on the first window receives a touch, open the second\r\nlabel.addEventListener(\"click\", function(e) {\r\n navGroup.open(second);\r\n});\r\n\r\n//When the label on the first window receives a touch, open the second\r\nlabel2.addEventListener(\"click\", function(e) {\r\n navGroup.open(third);\r\n});\r\n\r\n//This is the main window of the application\r\nvar main = Ti.UI.createWindow();\r\nmain.add(navGroup);\r\nmain.open();\r\n{code}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T13:36:41.000+0000", "updated": "2011-06-23T13:36:41.000+0000" }, { "id": "158924", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Passed as expected on iPhone running iOS 4.2.8 and iOS 3.1.2 as ", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-07T11:09:35.000+0000", "updated": "2011-07-07T11:09:35.000+0000" }, { "id": "158925", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "* also passed on iPad w/ iOS 4.3", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-07T11:10:53.000+0000", "updated": "2011-07-07T11:10:53.000+0000" }, { "id": "164423", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix seen in SDK 1.8.0.v20110817105307", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-29T15:39:48.000+0000", "updated": "2011-08-29T15:39:48.000+0000" }, { "id": "182923", "author": { "name": "fmcypriano", "key": "fmcypriano", "displayName": "Felipe Cypriano", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm using Titanium Mobile 1.8.1 building with iOS SDK 5.0 and this bug still exists.\r\n\r\nIMO it should be reopened.", "updateAuthor": { "name": "fmcypriano", "key": "fmcypriano", "displayName": "Felipe Cypriano", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-13T10:24:46.000+0000", "updated": "2012-02-13T10:24:46.000+0000" }, { "id": "182984", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Felipe, can you please provide code that reproduces your findings? The code attached to this bug does not show any issues. Thanks!", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-13T15:38:36.000+0000", "updated": "2012-02-13T15:38:36.000+0000" }, { "id": "183011", "author": { "name": "fmcypriano", "key": "fmcypriano", "displayName": "Felipe Cypriano", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Thomas,\r\n\r\nI just realize that the code is a little different from the original. This is the reproducible code:\r\n\r\n{code}\r\n//Here's the first window...\r\nvar first = Ti.UI.createWindow({\r\n backgroundColor:\"#fff\",\r\n title:\"My App\",\r\n barImage: 'barTop.png'\r\n});\r\nvar label = Ti.UI.createLabel({ text: \"poke me to open the next window\",top:0,height:30 });\r\nfirst.add(label);\r\n\r\nvar label2 = Ti.UI.createLabel({ text: \"poke me to open the next window\",top:40,height:30 });\r\n\r\n//Here's the nav group that will hold them both...\r\nvar navGroup = Ti.UI.iPhone.createNavigationGroup({\r\n window:first\r\n});\r\n\r\n//Here's a window we want to push onto the stack...\r\nvar second = Ti.UI.createWindow({\r\n backgroundColor:\"#fff\",\r\n title:\"Child Window\",\r\n barImage: 'barTop.png'\r\n});\r\nsecond.add(label2);\r\n\r\n//Here's a window we want to push onto the stack...\r\nvar third = Ti.UI.createWindow({\r\n backgroundColor:\"#fff\",\r\n title:\"I'm a hidden title\",\r\n barImage: 'barTop.png'\r\n});\r\nthird.add(Ti.UI.createLabel({text:\"Here's the child with hidden title\", color: '#000000'}));\r\n\r\n//When the label on the first window receives a touch, open the second\r\nlabel.addEventListener(\"click\", function(e) {\r\n navGroup.open(second);\r\n});\r\n\r\n//When the label on the first window receives a touch, open the second\r\nlabel2.addEventListener(\"click\", function(e) {\r\n navGroup.open(third);\r\n});\r\n\r\n//This is the main window of the application\r\nvar main = Ti.UI.createWindow();\r\nmain.add(navGroup);\r\nmain.open();\r\n{code}\r\n\r\nThe problem occur on the third window in the navigation group.", "updateAuthor": { "name": "fmcypriano", "key": "fmcypriano", "displayName": "Felipe Cypriano", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-14T05:23:31.000+0000", "updated": "2012-02-14T05:23:31.000+0000" }, { "id": "183042", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yea the bug Exists. Here is the sample code.\r\n{code}\r\nfunction newWin()\r\n{\r\n\tvar newWin = Ti.UI.createWindow({\r\n\t\tbackgroundColor:'white',\r\n\t\tbarImage: 'images/header-backer.png',\r\n\t\ttitle: 'New Window'\r\n\t});\r\n\r\n\tvar newBtn = Ti.UI.createButton({\r\n\t\ttitle: 'new win',\r\n\t\ttop: 20,\r\n\t\tleft: 20,\r\n\t\twidth: 200,\r\n\t\theight: 20\r\n\t});\r\n\r\n\tnewBtn.addEventListener('click', function() {\r\n\t\tnavGroup.open(openWin());\r\n\t});\r\n\t\r\n\tvar newBack = Ti.UI.createButton({\r\n\t\ttitle: 'back',\r\n\t\ttop: 0,\r\n\t\tleft: 0,\r\n\t\twidth: 100,\r\n\t\theight: 15\r\n\t});\r\n\t\r\n\tnewBack.addEventListener('click', function() {\r\n\t\tcloseWin(newWin);\r\n\t});\r\n\t\r\n\tnewWin.leftNavButton = newBack;\r\n\t\r\n\tnewWin.add(newBtn);\r\n\t\r\n\treturn newWin;\r\n}\r\n\r\nfunction openWin()\r\n{\r\n\treturn newWin();\r\n}\r\n\r\nfunction closeWin(newWin)\r\n{\r\n\tnavGroup.close(newWin);\r\n}\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'white',\r\n\tbarImage: '/header-backer.png',\r\n\ttitle: 'Main Window'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'new win',\r\n\ttop: 20,\r\n\tleft: 20,\r\n\twidth: 200,\r\n\theight: 20\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n\tvar winToOpen = newWin();\r\n\tnavGroup.open(winToOpen);\r\n});\r\n\r\nwin.add(btn);\r\n\r\nvar navGroup = Ti.UI.iPhone.createNavigationGroup({\r\n\twindow : win\r\n});\r\n\r\nvar containerWindow = Ti.UI.createWindow();\r\ncontainerWindow.add(navGroup);\r\ncontainerWindow.open();\r\n\r\n{code}", "updateAuthor": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-14T09:04:09.000+0000", "updated": "2012-02-14T09:04:09.000+0000" }, { "id": "183047", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening this issue based on last 2 comments.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-14T09:37:03.000+0000", "updated": "2012-02-14T09:37:03.000+0000" }, { "id": "183058", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Felipe & Devang\r\n\r\nThanks for providing updated sample test cases.\r\n\r\nI verified that this is indeed an issue in 1.8.1\r\n\r\nI also tested against the latest master branch (AOTW 1.9.0.v20120213174634) from the CI build page http://builds.appcelerator.com.s3.amazonaws.com/index.html and this issue does not occur there.\r\n\r\n", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-14T10:46:38.000+0000", "updated": "2012-02-14T10:48:21.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }