Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2117] Alloy compilation fails if tss has expr function

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2013-02-19T16:18:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterVinothbabu
AssigneeShak Hossain
Created2013-02-05T14:43:42.000+0000
Updated2016-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

Comments

  1. Eduardo Gomez 2013-02-18

  2. Vinothbabu 2013-02-19

    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.
  3. Vinothbabu 2013-02-19

    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.
  4. Eduardo Gomez 2013-02-19

  5. Shak Hossain 2013-12-28

    Hi Vinothbabu, Now that the documentation has been updated, please let me know if we can close this ticket.
  6. Mostafizur Rahman 2013-12-31

  7. Shak Hossain 2014-01-15

    Closing since we have not heard back from the reporter and the issue can't be reproduced.

JSON Source