{ "id": "78786", "key": "TIMOB-4895", "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": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-12-16T09:30:31.000+0000", "created": "2011-08-05T04:07:29.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:32.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": "JSS does not work for me for any versions of the Titanium SDK. The following code may be used to reproduce the issue (taken from the [Cross-platform layout using JSS|http://wiki.appcelerator.org/display/guides/Designing+the+User+Interface#DesigningtheUserInterface-CrossplatformlayoutusingJSS] guide). Note that a full rebuild was performed between jss changes:\r\n\r\n{code:javascript|title=app.js}\r\nvar window = Ti.UI.createWindow({\r\n\tid:\"w\"\r\n});\r\nvar button = Ti.UI.createButton({\r\n\tid:\"button\",\r\n\ttitle:\"Hello\",\r\n\tclassName:\"b\"\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n\r\n{code:javascript|title=app.jss}\r\n#w {\r\n\tbackground-color:'#0f0';\r\n}\r\nbutton {\r\n\twidth:'200';\r\n}\r\n.b {\r\n\theight:'100';\r\n}\r\n{code}\r\n\r\n{code:title=console log}\r\n 382 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 382 AndroidRuntime D CheckJNI is ON\r\n 53 WindowManager I WIN DEATH: Window{44d79978 com.testing.testing7/com.testing.testing7.Testing7Activity paused=false}\r\n 53 ActivityManager I Process com.testing.testing7 (pid 361) has died.\r\n 53 UsageStats I Unexpected resume of com.android.launcher while already resumed in com.testing.testing7\r\n 53 InputManagerService W Got RemoteException sending setActive(false) notification to pid 361 uid 10030\r\n 382 AndroidRuntime D --- registering native functions ---\r\n 382 ddm-heap D Got feature list request\r\n 53 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x\r\n 10000000 cmp=com.testing.testing7/.Testing7Activity }\r\n 53 ActivityManager I Start proc com.testing.testing7 for activity com.testing.testing7/.Testing7Activity: pid=388 uid=10030 g\r\n ids={1015, 3003}\r\n 382 AndroidRuntime D Shutting down VM\r\n 382 dalvikvm D DestroyJavaVM waiting for non-daemon threads to exit\r\n 382 dalvikvm D DestroyJavaVM shutting VM down\r\n 382 dalvikvm D HeapWorker thread shutting down\r\n 382 dalvikvm D HeapWorker thread has shut down\r\n 382 jdwp D JDWP shutting down net...\r\n 382 dalvikvm I Debugger has detached; object registry had 1 entries\r\n 382 dalvikvm D VM cleaning up\r\n 382 AndroidRuntime E ERROR: thread attach failed\r\n 382 dalvikvm D LinearAlloc 0x0 used 638596 of 5242880 (12%)\r\n 388 ddm-heap D Got feature list request\r\n 388 TiApplication I (main) [0,0] checkpoint, app created.\r\n 388 dalvikvm D GC freed 2828 objects / 313816 bytes in 53ms\r\n 388 TiApplication I (main) [392,392] Titanium 1.7.3 (2011/08/01 09:23 )\r\n 388 TiDeployData D (main) [39,431] Read deploy data: {\"debuggerPort\":-1,\"debuggerEnabled\":false,\"fastdevPort\":44619}\r\n 388 TiPlatformHelper E (main) [33,464] platformId is null, setting to empty string\r\n 388 TiDbHelper I (main) [24,488] No value in database for platform key: 'unique_machine_id' returning supplied default ''\r\n \r\n 388 TiDbHelper I (main) [12,500] No value in database for platform key: 'hardware_machine_id' returning supplied default \r\n ''\r\n 388 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n 388 TiApplication E (main) [207,207] APP PROXY: [Ti.App]\r\n 388 TiCommonContactsApi D (main) [15,222] Using newer contacts api. Android SDK level: 7\r\n 388 dalvikvm D GC freed 5554 objects / 427296 bytes in 50ms\r\n 388 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char \r\n buffer is required.\r\n 388 TiFastDev D (kroll$1: app://app.js) [385,607] Enabling Fastdev on port 44619\r\n 388 TiFastDev D (kroll$1: app://app.js) [9,616] sent tokens successfully\r\n 388 TiFastDev D (kroll$1: app://app.js) [2,618] Fastdev session handshake succesful.\r\n 388 dalvikvm D GC freed 8119 objects / 558904 bytes in 57ms\r\n 388 KrollContext D (kroll$1: app://app.js) [115,733] Running evaluated script: file:///android_asset/Resources/app.js\r\n 388 dalvikvm D GC freed 1239 objects / 98384 bytes in 48ms\r\n 388 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. context = org.appcelerator.titanium.TiContext@44ec1838\r\n \r\n 388 TiAnalyticsSvc W (Thread-12) [30,30] Analytics Service Started\r\n 53 ActivityManager I Displayed activity com.testing.testing7/.Testing7Activity: 2382 ms (total 2382 ms)\r\n 388 TiAnalyticsSvc I (Thread-12) [391,421] Sending 1 analytics events.\r\n 53 NotificationService W Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@44e94d50 in packag\r\n e com.testing.testing7\r\n 53 ActivityManager W setProcessForeground called on unknown pid: 361\r\n 388 dalvikvm D GC freed 7363 objects / 439568 bytes in 62ms\r\n 388 TiAnalyticsSvc W (Thread-12) [1323,1744] Stopping Analytics Service\r\n 96 dalvikvm D GC freed 199 objects / 8712 bytes in 65ms\r\n{code}\r\n\r\nI also tried the following jss, with the dimensions as numbers rather than strings, with the same results:\r\n\r\n{code:javascript|title=app.js}\r\n#w {\r\n\tbackground-color:'#0f0';\r\n}\r\nbutton {\r\n\twidth:200;\r\n}\r\n.b {\r\n\theight:100;\r\n}\r\n{code}\r\n\r\nand using camelCase:\r\n\r\n{code:javascript|title=app.js}\r\n#w {\r\n\tbackgroundColor:'#0f0';\r\n}\r\nbutton {\r\n\twidth:200;\r\n}\r\n.b {\r\n\theight:100;\r\n}\r\n{code}\r\n\r\nThis is the result:\r\n\r\n!http://img714.imageshack.us/img714/5595/screenshot316b.png|width=300!\r\n\r\nNote there has also been a report from another user that no pixel definitions work when used *in classes*, for example:\r\n* width: 100;\r\n* width: '100px';\r\n* width: 100px;\r\n\r\nThis is also demonstrated in the code above, using the *.b* class. Would you check that these work too after the fix is applied?\r\n", "attachment": [], "flagged": false, "summary": "Android: JSS not working", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 1.7.1 (2011/06/17 00:13 293a6d...), 1.7.3 (2011/08/01 09:23 )\r\n* Android 2.1-update1 (emulator)\r\n* Titanium Studio, build: 1.0.4.201108041935\r\n* Ubuntu 10.04", "comment": { "comments": [ { "id": "176332", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "This issue has been resolved. Please close at your discretion! ;)\r\n\r\nUsing:\r\n* Titanium SDK version: 1.8.0.1 (12/16/11 01:01 61086c9)\r\n* Android APIs 2.2\r\n* emulator\r\n\r\n{code}\r\n/* works correctly */\r\n#w {\r\n\tbackground-color:'#00f';\r\n}\r\n\r\n/* works correctly including orientation - ids override classes when set on the same objects */\r\n#button {\r\n\theight:'200';\r\n\twidth:'400';\r\n}\r\n\r\n/* works correctly including orientation */\r\n.b {\r\n\theight:'60%';\r\n\twidth:'80%';\r\n}\r\n\r\n/* works correctly including orientation (integers as strings interpreted as px) */\r\n/*.b {\r\n\theight:'300';\r\n\twidth:'400';\r\n}*/\r\n\r\n/* works correctly including orientation (integers interpreted as px) */\r\n/*.b {\r\n\theight:300;\r\n\twidth:400;\r\n}*/\r\n{code}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-16T08:39:33.000+0000", "updated": "2011-12-16T08:39:33.000+0000" }, { "id": "176337", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Closing, with Don's blessing! :)", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-16T09:31:33.000+0000", "updated": "2011-12-16T09:31:33.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }