XML declaration warning

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XML declaration warning

Serkan Taş
Hi,

While declaring xml in mxml, I am getting warning from the compiler for case 1, and fixed with case 2. I thought  someone may need to know.

case1 :

private function refreshSelect(data:XML):void {
                var xml:XML = <mydata id="" />
                xml.@id = data;
                jobTree.refreshTree(xml);
}

converted to :

com.likya.pinara.main.PinaraUI.prototype.com_likya_pinara_main_PinaraUI_refreshSelect = function(data) {
  var /** @type {XML} */ xml = new XML( '<mydata id="" />\r\
\t\t\t\t');
  xml.setAttribute('id', data);
  this.jobTree.refreshTree(xml);
};

warning :

Sep 16, 2019 6:09:36 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: D:/dev/royale-emulation-works/github/bin/js-debug/com/likya/pinara/main/PinaraUI.js:367: WARNING - String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
  var /** @type {XML} */ xml = new XML( '<mydata id="" />\r\
                                        ^


case2 :
private function refreshSelect(data:XML):void {
                var xml:XML = <mydata id="" />;
                xml.@id = data;
                jobTree.refreshTree(xml);
 }


converted to :


com.likya.pinara.main.PinaraUI.prototype.com_likya_pinara_main_PinaraUI_refreshSelect = function(data) {
  var /** @type {XML} */ xml = new XML( '<mydata id="" />');
  xml.setAttribute('id', data);
  this.jobTree.refreshTree(xml);
};


No warning.
Reply | Threaded
Open this post in threaded view
|

Re: XML declaration warning

Alex Harui-2

It would be great if you could file a GitHub issue to track this.

 

Thanks,

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Monday, September 16, 2019 at 8:11 AM
To: "[hidden email]" <[hidden email]>
Subject: XML declaration warning

 

Hi,

While declaring xml in mxml, I am getting warning from the compiler for case 1, and fixed with case 2. I thought  someone may need to know.

case1 :

private function refreshSelect(data:XML):void {
                var xml:XML = <mydata id="" />
                xml.@id = data;
                jobTree.refreshTree(xml);
}

converted to :

com.likya.pinara.main.PinaraUI.prototype.com_likya_pinara_main_PinaraUI_refreshSelect = function(data) {
  var /** @type {XML} */ xml = new XML( '<mydata id="" />\r\
\t\t\t\t');
  xml.setAttribute('id', data);
  this.jobTree.refreshTree(xml);
};

warning :

Sep 16, 2019 6:09:36 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: D:/dev/royale-emulation-works/github/bin/js-debug/com/likya/pinara/main/PinaraUI.js:367: WARNING - String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
  var /** @type {XML} */ xml = new XML( '<mydata id="" />\r\
                                        ^


case2 :
private function refreshSelect(data:XML):void {
                var xml:XML = <mydata id="" />;
                xml.@id = data;
                jobTree.refreshTree(xml);
 }


converted to :


com.likya.pinara.main.PinaraUI.prototype.com_likya_pinara_main_PinaraUI_refreshSelect = function(data) {
  var /** @type {XML} */ xml = new XML( '<mydata id="" />');
  xml.setAttribute('id', data);
  this.jobTree.refreshTree(xml);
};

No warning.

Reply | Threaded
Open this post in threaded view
|

Re: XML declaration warning

Serkan Taş
Sure,

Here it is :
https://github.com/apache/royale-asjs/issues/470

Thanks

16.09.2019 19:34 tarihinde Alex Harui yazdı:
No warning.