[ALOY-83] Allow platform conditionals in markup via the "platform" attribute
GitHub Issue | n/a |
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-19T11:52:02.000+0000 |
Affected Version/s | 2012 Sprint 14 |
Fix Version/s | 2012 Sprint 14 |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2012-07-01T14:45:24.000+0000 |
Updated | 2014-06-22T13:21:04.000+0000 |
Description
Basic Description
To allow marking to make platform-specific code, we should use the "platform" attribute with basic logic in it. The generated code should use compiler directives if the platform is known at compile time. It will use runtime checks if the platform is not known at compile time.
* The platform name will indicate its usage
* The exclamation point \(!\) will negate a platform
* A comma \(,\) will serve as an OR operator
Examples
This would show the view on android and ios devices
This would should the view on any platform that is not mobileweb
Comments
JSON Source
Both the runtime and compile time conditional have been implemented. Additional work needs to be done to ensure that special tag parsers that handle the parsing of their children also abide by these platform specifications.