[ALOY-1149] iOS: Gradient array properties are converted into objects
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-10-02T21:15:15.000+0000 |
Affected Version/s | Alloy 1.5.0 |
Fix Version/s | Alloy 1.5.1 |
Components | Styling |
Labels | qe-3.4.0, qe-manualtest, regression |
Reporter | Federico Casali |
Assignee | Tim Poulsen |
Created | 2014-09-26T22:33:46.000+0000 |
Updated | 2014-11-19T00:07:39.000+0000 |
Description
Problem description
Gradients contain properties as array, for example the 'color' property. In Alloy, those properties are now converted and passed as objects and an app is crashing if using those properties. The issue seems to be introduced after ALOY-1051 as is not reproducible using Alloy version 1.4.1 (and Alloy 1.5.0-rc3 as well - see ALOY-1146, where a regression was introduced breaking Aloy-1051), but is reproducible with Alloy 1.5.0-rc, 1.5.0-rc2 and 1.5.0-rc5. Is therefore a regression.Steps to reproduce
1. Grab the sample code for ALOY-717 : https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-717 2. Run the sample app on iOS (any version) Result: App crashes with an "Application Error - Invalid type passed to function at alloy.js" See error log attached and screenshot. 3. Edit index.tss and comment the 'colors' property for .bgGradient class:
'.bgGradient': {
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
// colors: [
// { color: 'red', offset: 0.0},
// { color: 'blue', offset: 0.25 },
// { color: 'red', offset: 1.0 }
// ],
}
}
and run on iOS devices
Result: app runs fine and no error are thrown.
Attachments
File | Date | Size |
---|---|---|
gradient_error_log.txt | 2014-09-26T22:33:46.000+0000 | 875 |
IMG_0452.PNG | 2014-09-26T22:33:46.000+0000 | 67830 |