apache / royale-asjs

Apache Royale ASJS
Apache License 2.0
372 stars 116 forks source link

Uncaught TypeError: cls is not a constructor (MXMLDataInterpreter.js:54) #889

Open pashminakazi opened 4 years ago

pashminakazi commented 4 years ago

Project Details are : https://paste.apache.org/cpo8y Test case is available on VDI. Go to General Ledger from Select in Menu Go to GL Tab from Menu Go to Enter Voucher from GL in Menu File : com/dbz/modules/GL/dbzJournalVoucher.mxml

Open this Document and this exception occurs : image image

aharui commented 4 years ago

Figure out which class/component is calling the MXMLDataInterpreter. Examine the data in that .js file and compare it to the MXML file.

pashminakazi commented 4 years ago

com.dbz.components.dbzFlexiGrid.mxml is calling the MXMLDataInterpreter.dbzFlexiGrid is in DBIZLib image

com.dbz.components.dbzFlexiGrid.mxml : https://paste.apache.org/3ozwe

In Document dbzJournalVoucher dbzFlexiGrid is used like

<components:dbzFlexiGrid height="30" y="24" right="2" left="93" id="searchBar">
</components:dbzFlexiGrid>
aharui commented 4 years ago

Next step is to check dbzFlexiGrid.js. There will be an MXMLDescriptor getter that returns a data array. Examine the array and match it in the debugger at the exception. Looks like i=1 so it is creating a child object for whatever component it is creating in initializeStrandBasedObject.

Every time you've reported this kind of issue in the past it has been because some other file has invalid output or was not loaded for some other reason. By examining the data in the call stack of MXMLDataInterpreter you can find out what was not loaded correctly.