Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Error in Problems panel, if only within Declarations allowed tags are defined outside of it #209

Closed
neminovno opened this issue May 1, 2018 · 1 comment

Comments

@neminovno
Copy link
Contributor

Some of tags that must be within Declarations are: DateFormater, PhoneNumberValidator, PhoneFormatter, NumberValidator, MultiDPIBitmapSource, RemoteObject, HTTPService.

Example code:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx">

	<mx:DateFormatter id="dateFormatter" formatString="DD/MM/YYYY" />

</s:WindowedApplication>

This error appears but only in Terminal when build is run:

Error: 'DateFormatter' declaration must be contained within the tag, since it is not assignable to the default property's type 'Array' or element type 'mx.core.IVisualElement'.

    <mx:DateFormatter id="dateFormatter" formatString="DD/MM/YYYY" />

The terminal process terminated with exit code: 1

@joshtynjala
Copy link
Member

Fixed in the following apache/royale-compiler commits:

I will probably add this to vscode-as3mxml after Apache Royale 0.9.7 is officially released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants