[AC-2117] Alloy compilation fails if tss has expr function
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-02-19T16:18:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Vinothbabu |
Assignee | Shak Hossain |
Created | 2013-02-05T14:43:42.000+0000 |
Updated | 2016-03-08T07:41:05.000+0000 |
Description
http://pastie.org/private/gigutdvlml8zjzjc3pc0g
Upon compiling this tss file, we get the following error below. The tss is perfectly valid.
[INFO] logfile = D:\My-Projects\Mobile\Guhah\dsd\build.log
[INFO] Building dsd for Android ... one moment
[INFO] plugin=C:\Users\vinothb\AppData\Roaming\Titanium\plugins\ti.alloy\1.0\plugin.py
[INFO] Detected compiler plugin: ti.alloy/1.0
[ERROR] Application Installer abnormal process termination. Process exit value was 1
[INFO] alloy app found at D:\My-Projects\Mobile\Guhah\dsd\app
[INFO] Executing Alloy compile:
[INFO] alloy.cmd compile D:\My-Projects\Mobile\Guhah\dsd\app --no-colors --config platform=android,version=8,simtype=none,devicefamily=none,deploytype=development,
.__ .__
_____ | | | | ____ ___.__.
\__ \ | | | | / _ < | |
/ __ \| |_| |_( <_> )___ |
(____ /____/____/\____// ____|
\/ \/
[ERROR] Error processing style "D:\My-Projects\Mobile\Guhah\dsd\app\styles\index.tss"
[ERROR] Alloy compile failed
the expr function is referenced via the styles for calculation. for instance, top:expr((((Ti.Platform.displayCaps.platformHeight * 0.95) * 0.1) * 0.18)). the value of top is calculated something like this, because we are not able to directly call the Ti.Platform.displayCaps.platformHeight.
I see the problem now, https://github.com/appcelerator/alloy/commit/e9fdc93c9760a1590c0abd0136662c11dc678066#commitcomment-2401085. I just got to tony's comment and it seems tss would not perform any calculation. height:expr(Ti.Platform.displayCaps.platformHeight * 0.075) // would fail. height:Ti.Platform.displayCaps.platformHeight * 0.075 // would also fail.
Hi Vinothbabu, Now that the documentation has been updated, please let me know if we can close this ticket.
Closing since we have not heard back from the reporter and the issue can't be reproduced.