{ "id": "61855", "key": "TIMOB-1223", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:55:34.000+0000", "created": "2011-04-15T02:46:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "blackberry", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:55:34.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}

By \"dynamic properties\" here we mean \"unofficial\" (unregistered)\nproperties, such as if a developer just sets a property in JS on\none of our proxies, like:

\n
\nvar win = Ti.UI.createWindow();\nwin.secret = \"my secret message\";\n
\n

\"secret\" is not a registered property of WindowProxy. In\nAndroid/BB, we handle the assignment by passing it on to the\nscriptable -- we don't give it to the proxy. Later, if the proxy is\nwrapped again into a different KrollObject, and code tries to get\nthe property value, it will fail.

\n

This happens with currentWindow, for example, when a new context\nis created for a window and then Ti.UI.currentWindow is set to a\nwrapped instance of that window proxy. Here's a complete fail case\nexample:

\n

File: app.js

\n
\n// ....\nvar win = Ti.UI.createWindow({url:'win1.js'});\nwin.secret = \"My secret message\";\nTi.API.info(win.secret); // ok -- .secret is on the scriptable\nwin.open(); // causes new context win1.js\n
\n

File: win1.js

\n
\nvar win = Ti.UI.currentWindow;\nTi.API.info(win.secret); // fails -- currentWindow is different scriptable than win was in previous context\n
\n

In our iPhone/iPad implementation, these unregistered properties\nare put right into the proxy's (target's) dynprops collection and\nare therefore available even if the proxy gets wrapped into a\ndifferent scriptable.

{html}", "attachment": [], "flagged": false, "summary": "Dynamic properties not carried across contexts", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "125102", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This is related to #1005 as well.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:58.000+0000", "updated": "2011-04-15T02:46:58.000+0000" }, { "id": "125103", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

To help with prioritizing, I just want to note that I (and\nothers too) are currently being stymied by this problem and are\neagerly looking forward to \"Passing Data\" being supported on\nAndroid and BlackBerry (see http://developer.appcelerator.com/helpdesk/view/28391).

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:58.000+0000", "updated": "2011-04-15T02:46:58.000+0000" }, { "id": "125104", "author": { "name": "bxgrant", "key": "bxgrant", "displayName": "bxgrant", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

+1 for prioritizing this in 1.5. It makes it difficult to create\nmeaningful abstractions for enterprise apps without this\nfunctionality.

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

There are a few cases where this will work. We are adding\nfeatures for Android where this will absolutely not work by design.\nPlease don't rely on it as a silver bullet. Blackberry may have\nsome of the same restrictions but in different areas.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:59.000+0000", "updated": "2011-04-15T02:46:59.000+0000" }, { "id": "125106", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

So how will child contexts be able to access data from their\nparent context? Only through manual Ti.API.Properties calls? Or\nwill I need to have it fire an event on the parent that fires an\nevent back on the child, passing it the data? Neither of those two\noptions seems like something that should be done (let alone the\nonly way to get something done) in a modern framework...

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:59.000+0000", "updated": "2011-04-15T02:46:59.000+0000" }, { "id": "125107", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Do you have any guess yet as to when you'll be able to code a\nfix for this? Trying to gauge if it's worth waiting for the fix or\nif we'll need to make the time to rearchitect our code around this\nproblem.

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:59.000+0000", "updated": "2011-04-15T02:46:59.000+0000" }, { "id": "125108", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Marshall is actively working on the required refactor to support\nthis capability.

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

Thank you for increasing the priority, a fix for this would be\ngreat!

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

This should be fixed by #915

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:47:00.000+0000", "updated": "2011-04-15T02:47:00.000+0000" }, { "id": "125111", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thank you! Confirmed fixed on Android 2.1.

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:47:00.000+0000", "updated": "2011-04-15T02:47:00.000+0000" }, { "id": "125112", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

confirmed iOS 4.0.2 and 3.1.2. Android 2.2. Thanks for\nconfirming 2.1 Matthew!

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:47:00.000+0000", "updated": "2011-04-15T02:47:00.000+0000" }, { "id": "125113", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

FYI parts of this fix appear to have regressed in master\n(1.5.0); see #2221.

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:47:00.000+0000", "updated": "2011-04-15T02:47:00.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }