[ALOY-1538] Alloy <FlexSpace> is wrapped with a deprecated API
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2017-01-27T10:55:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | XML |
Labels | n/a |
Reporter | Francisco Ruaro Varisco |
Assignee | Hans Knöchel |
Created | 2016-08-31T02:08:09.000+0000 |
Updated | 2017-01-27T14:46:47.000+0000 |
Description
Every time I use the Alloy FlexSpace component I get a warning.
*Code:*
<TextField id="txtAmount" class="labelOrange label18Bold keyboardNumber">
<KeyboardToolbar>
<Toolbar>
<Items>
<FlexSpace />
<Button style="Ti.UI.iOS.SystemButtonStyle.DONE" onClick="onDoneClick">Done</Button>
</Items>
</Toolbar>
</KeyboardToolbar>
</TextField>
*WARNING:*
{noformat}
[WARN] Ti.UI.iPhone.SystemButton.FLEXIBLE_SPACE DEPRECATED in 5.4.0, in favor of Ti.UI.iOS.SystemButton.FLEXIBLE_SPACE
{noformat}
You might have to change it to the new API's.
Hello, This is an warning. The app should build without any error. Thanks.
It is building without any error, but it would be better not to have any warning as well. That's why I put the "type" of the ticket as "IMPROVEMENT" not "BUG" :)
Please update your project. That warning because, you are trying to use Deprecated functions. Thanks
So
This should not be closed. This is an Alloy issue not a user project issue. I see the same WARN messages in my app using 6.0.1. Alloy is generating deprecated code when you use the
This is a valid issue, caused by Alloy probably using the deprecated
Ti.UI.iPhone
namespace instead ofTi.UI.iOS
. Although I think it's fixed for latest Alloy, I'll move to Alloy for further investigation next sprint.Update: Checked this. [~nunocostapt] did an [Alloy PR](https://github.com/appcelerator/alloy/pull/798) last September to fix all deprecated API calls in Alloy. This should not occur in latest Alloy anymore and I cannot reproduce it. [~acvauctions], which Alloy /Ti version are you testing with? The patch was in Alloy 1.9.3 and SDK 6.0.0, see ALOY-1520.
Below is what I'm running. I was seeing the WARN messages when generating a non-platform app and thus using 1.9.0. I see that my platform-generated apps are using the
UI.iOS
namespace properly. Sorry, I always forget that you guys embed separate versions within the appc/platform environment (a decision I didn't like back when I worked there and suggested then that it would cause confusion and issues).