You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/06/24 08:09:32 UTC

[royale-asjs] branch develop updated: QName needs toString()

This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new e5ccb5b  QName needs toString()
e5ccb5b is described below

commit e5ccb5bae7d73b36be544c09e45d6b8590960ea1
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Jun 24 11:09:19 2019 +0300

    QName needs toString()
---
 frameworks/projects/Language/src/main/royale/QName.as | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/frameworks/projects/Language/src/main/royale/QName.as b/frameworks/projects/Language/src/main/royale/QName.as
index cdb01eb..5a4bb2b 100644
--- a/frameworks/projects/Language/src/main/royale/QName.as
+++ b/frameworks/projects/Language/src/main/royale/QName.as
@@ -120,7 +120,7 @@ package
 			return name != null && this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
 		}
 		
-    	COMPILE::JS
+    COMPILE::JS
 		public function matches(name:QName):Boolean
 		{
 			if (name == null) return this.localName == "*";
@@ -174,7 +174,15 @@ package
 			return new Namespace(_prefix,_uri);
 		}
 
-	}
-}
+		COMPILE::JS
+		public function toString():String
+		{
+			// This should cover "*" as well
+			if(_uri)
+				return _uri + "::" + _localName;
 
+			return _localName;
+		}
 
+	}
+}