{ "id": "61642", "key": "TIMOB-1010", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:56.000+0000", "created": "2011-04-15T02:41:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "menu" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:56.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Platform 1.3.0, Android 2.1

\n

I have a \"heavyweight\" android window with menu attached. I try\nto change \"title\" property of one menu items, after click.\nSomething like:

\n
\nController.prototype.onMenuClick = function(e) {\n  e.source.title = 'New title based on some condition';\n}\n
\nbut it doesn't work. Title is same.
{html}", "attachment": [], "flagged": false, "summary": "Ti.Android.OptionMenu.Menu doesn't respect title property change", "creator": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124561", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

We'll look into this, but the native Tab control does not allow\nchanges after creation.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:27.000+0000", "updated": "2011-04-15T02:41:27.000+0000" }, { "id": "124562", "author": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Don,
\nIt's not a Tab, it's an Android Menu

{html}", "updateAuthor": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:27.000+0000", "updated": "2011-04-15T02:41:27.000+0000" }, { "id": "124563", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Ok this appears to be that the source is not what you're\nexpecting. We'll definitely look into it.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:27.000+0000", "updated": "2011-04-15T02:41:27.000+0000" }, { "id": "124564", "author": { "name": "matthewlenton", "key": "matthewlenton", "displayName": "Matthew Lenton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I'm on it, though a tip or source to reproduce this would be\nhelpful.

{html}", "updateAuthor": { "name": "matthewlenton", "key": "matthewlenton", "displayName": "Matthew Lenton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:28.000+0000", "updated": "2011-04-15T02:41:28.000+0000" }, { "id": "124565", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Most likely the onPropertyChange didn't get implemented for\ntitle and/or icon. Basically you need an app.js that creates a\nmenu. You don't even need to worry about a windows. Just in the\nonclick of them menu change the title of the item. Then when you\npress the menu button again, it should show the new title.

\n

Please check icon as well.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:28.000+0000", "updated": "2011-04-15T02:41:28.000+0000" }, { "id": "124566", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

We've verified that setting the menu title and icon do function\nas expected. You need to set your listener on the actual object not\nits prototype. We inject objects in Javascript from the native side\nand they're effectively wrappers around native objects. In that\nrespect they don't \"obey\" prototype as you're expecting.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:28.000+0000", "updated": "2011-04-15T02:41:28.000+0000" }, { "id": "124567", "author": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Don,
\nNo, it's not a problem of prototype, I have my own event manager,\nwhich keeps context and allows to attach and pass custom data to\nevent handlers. All objects inside event handler are valid, event\nhandler is executed and it works everywhere across project.

\n

I'll prepare simple project to reproduce this bug.

{html}", "updateAuthor": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:28.000+0000", "updated": "2011-04-15T02:41:28.000+0000" }, { "id": "124568", "author": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Ooops, Don and Matthew, I'm very sorry, I found stupid bug in my\nsource code. From now, I'll check my bug report more carefully.

\n

Sorry again

{html}", "updateAuthor": { "name": "konstantin", "key": "konstantin", "displayName": "Konstantin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:28.000+0000", "updated": "2011-04-15T02:41:28.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }