[TIMOB-2502] Some Titanium label properties not supported by Titanium JSS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2013-08-01T00:33:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, font, ios, jss, klist, rplist |
Reporter | James K |
Assignee | Blain Hamon |
Created | 2011-04-15T03:21:24.000+0000 |
Updated | 2017-03-20T17:53:51.000+0000 |
Description
The JSS parser seems to have issues when it encounters curly braces:
font:{fontSize:15, fontWeight:'bold'};
shadowOffset:{x:0, y:1};
The first line can be rewritten in JSS using CSS syntax as follows:
font-size:15;
font-weight:'bold';
This seems to be magically understood by Titanium.
But the CSS equivalent for shadows does not work:
text-shadow: 0 1 #6E7983;
The parser also requires JSS properties to be separated by semi-colons and not by commas, which means properties can't simply be cut and pasted from code files into JSS files. Not sure if this is by design, but it's a bit of a hassle.
Maybe also affects android?
I just verified that this also does not work on Android, and I collected some relevant logs.
If necessary, I can split off an Android ticket.
Tested On
BROKEN on Android Device Samsung Epic 4G running Android 2.2
BROKEN on iPhone Simulator 4.3
BROKEN with Titanium Mobile 1.6.2 (03/30/11 17:25 0243d42...)
BROKEN with Titanium Mobile 1.7.0 (04/05/11 10:30 731db9c...)
Relevant Logs
Regardless of the platform, the following syntax errors show up in the build logs:
On Android, these errors show up right after "[INFO] Copying platform-specific files ..." and on iOS right after "[INFO] iPhone simulated device: iphone".
Associated Helpdesk Ticket
http://support.appcelerator.com/tickets/MAK-12868-443">http://support.appcelerator.com/tickets/MAK-12868-443
JSS is like CSS and CSS does not allow values to be "objects" with curly braces. Furthermore, Titanium does not support shadowOffset or text-shadow and probably never will. Consider using Alloy.