We have seen assertion bugs crop up with Xml as well. It would be good if you 
could file a compiler bug for that. In the meantime you could disable asserts.

In ant you can add a jvm arg to mxmlc like this

<jvamarg line=”-da”/>

I’m not sure about Maven, I thought they were disabled by default.


From: Jim Page<mailto:jim.p...@redmatter.com>
Sent: Thursday, December 10, 2020 4:40 PM
To: users@royale.apache.org<mailto:users@royale.apache.org>
Subject: Porting from flex: Uncaught TypeError: 
org.apache.royale.debugging.assert is not a function

Hi There

I am experiencing this error when running a debug build of a flex app I am
porting. The full uncaught error stack is:

Uncaught TypeError: org.apache.royale.debugging.assert is not a function
    at Object.org.apache.royale.debugging.assertType (assertType.js:25)
    at XML.addChildInternal (XML.js:874)
    at Function.XML.insertAttribute (XML.js:427)
    at Function.XML.iterateElement (XML.js:460)
    at XML.XML_parseXMLStr (XML.js:743)
    at new XML (XML.js:31)
    at globals.js:94

The code it's trying to invoke is:

/**
 * asserts an object is of the desired type.
 * @param {Object} obj
 * @param {Object} type
 * @param {string} message
 */
org.apache.royale.debugging.assertType = function(obj, type, message) {

  if (goog.DEBUG)

org.apache.royale.debugging.assert(org.apache.royale.utils.Language.is(obj,
type), message);
}

Clearly I could switch goog.DEBUG off (where do I set that by the way?) but
if there are underlying problems I'd like them to be visible so I can fix
them.

Let me know what information you need if the answer is not immediately
obvious. I am running the nightly build of the royale SDK, built using
maven. I am on OSX big sur. I am using node's serve command to run a web
server locally from the is-debug directory built by mxmlc.

Thanks
Jim



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Reply via email to