vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

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

Open neminovno opened this issue 6 years ago • 1 comments

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 <Declarations> 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

neminovno avatar May 01 '18 16:05 neminovno

Fixed in the following apache/royale-compiler commits:

  • apache/royale-compiler@39945b1b19938fca6401c6c3ae172daa818748e1
  • apache/royale-compiler@d5b247ec9b5a8a30ed74c35a5b7dd1850f966ec1

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

joshtynjala avatar Nov 20 '19 17:11 joshtynjala