The following crashes my app in iOS:
<GridLayout rows="* auto auto auto 2*">
<TextField row="1" text="{{ username }}" autocorrect="false" autocapitalizationType="none" hint="email" keyboardType="email" cssClass="firstTextField" />
<TextField row="2" text="{{ password }}" secure="true" hint="password" />
<Button row="3" text="{{ resources.login }}" tap="{{ login }}" cssClass="primaryButton" />
<ActivityIndicator rowSpan="5" busy="{{ isLoading }}" />
</GridLayout>
With a native exception (crash):
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [187.5 nan]'
*** First throw call stack:
(
0 CoreFoundation 0x02d77746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0225ba97 objc_exception_throw + 44
...
I would expect:
- The
* auto auto auto 2* to be perfectly acceptable, since writing comma separators even in XAML was not a must, they add no meaning and are tedious to write.
- If the
* auto auto auto 2* must contain commas like *, auto, auto, auto, 2*, I would expect the app to warn during parsing the XML with source line and column, indicating the element and attribute that failed to parse.
- I would prefer warning with error details and malicious layout, before JavaScript exception with error details, before crash with native stack.
This following works like a charm:
<GridLayout rows="*, auto, auto, auto, 2*">
<TextField row="1" text="{{ username }}" autocorrect="false" autocapitalizationType="none" hint="email" keyboardType="email" cssClass="firstTextField" />
<TextField row="2" text="{{ password }}" secure="true" hint="password" />
<Button row="3" text="{{ resources.login }}" tap="{{ login }}" cssClass="primaryButton" />
<ActivityIndicator rowSpan="5" busy="{{ isLoading }}" />
</GridLayout>
The following crashes my app in iOS:
With a native exception (crash):
I would expect:
* auto auto auto 2*to be perfectly acceptable, since writing comma separators even in XAML was not a must, they add no meaning and are tedious to write.* auto auto auto 2*must contain commas like*, auto, auto, auto, 2*, I would expect the app to warn during parsing the XML with source line and column, indicating the element and attribute that failed to parse.This following works like a charm: