EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

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

EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
Hi,

I am getting the error below.




Here is the code piece while debugging (cls is undefined and throwing exception) :




Call stack :




When I comment the line(in red) below, not throw exception :

<s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" visible="false" includeInLayout="false"/>
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <!--comps:MenuBar excludeFrom="loggedOutState, dummyState" id="menuBar"/-->
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" /-->
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState, loggedOutState, dummyState" id="jobListDetail"/>
            <!--RO:jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/-->
        </s:Group>
       
    </s:Group>

Thanks,
Serkan
Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Alex Harui-2

You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.

 

The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.

 

HTH,

-Alex

 

 

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Sunday, September 22, 2019 at 10:24 PM
To: "[hidden email]" <[hidden email]>
Subject: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

Hi,

I am getting the error below.




Here is the code piece while debugging (cls is undefined and throwing exception) :




Call stack :




When I comment the line(in red) below, not throw exception :

<s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" visible="false" includeInLayout="false"/>
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <!--comps:MenuBar excludeFrom="loggedOutState, dummyState" id="menuBar"/-->
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" /-->
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState, loggedOutState, dummyState" id="jobListDetail"/>
            <!--RO:jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/-->
        </s:Group>
       
    </s:Group>

Thanks,
Serkan

Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:

You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.

 

The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.

 

HTH,

-Alex

 

 

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Sunday, September 22, 2019 at 10:24 PM
To: [hidden email] [hidden email]
Subject: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

Hi,

I am getting the error below.




Here is the code piece while debugging (cls is undefined and throwing exception) :




Call stack :




When I comment the line(in red) below, not throw exception :

<s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" visible="false" includeInLayout="false"/>
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <!--comps:MenuBar excludeFrom="loggedOutState, dummyState" id="menuBar"/-->
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" /-->
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState, loggedOutState, dummyState" id="jobListDetail"/>
            <!--RO:jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/-->
        </s:Group>
       
    </s:Group>

Thanks,
Serkan


Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Alex Harui-2

Yes, that’s how I knew what the call stack was.

 

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Sunday, September 22, 2019 at 10:46 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:

You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.

 

The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.

 

HTH,

-Alex

 

 

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Sunday, September 22, 2019 at 10:24 PM
To: [hidden email] [hidden email]
Subject: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

Hi,

I am getting the error below.




Here is the code piece while debugging (cls is undefined and throwing exception) :




Call stack :




When I comment the line(in red) below, not throw exception :

<s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" visible="false" includeInLayout="false"/>
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <!--comps:MenuBar excludeFrom="loggedOutState, dummyState" id="menuBar"/-->
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" /-->
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState, loggedOutState, dummyState" id="jobListDetail"/>
            <!--RO:jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/-->
        </s:Group>
       
    </s:Group>

Thanks,
Serkan




Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Harbs
In reply to this post by Serkan Taş
A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

HTH,
Harbs

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:
You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.
 
The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.
 
HTH,
-Alex
 
 
 
From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Sunday, September 22, 2019 at 10:24 PM
To: [hidden email] [hidden email]
Subject: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor
 
Hi,

I am getting the error below. 


<image001.png>

Here is the code piece while debugging (cls is undefined and throwing exception) : 


<image002.png>

Call stack : 

<image003.png>


When I comment the line(in red) below, not throw exception :

<s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
        
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
        
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" visible="false" includeInLayout="false"/>
        
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <!--comps:MenuBar excludeFrom="loggedOutState, dummyState" id="menuBar"/-->
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" /-->
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState, loggedOutState, dummyState" id="jobListDetail"/>
            <!--RO:jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/-->
        </s:Group>
        
    </s:Group>

Thanks,
Serkan




Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :



data array content :





23.09.2019 10:33 tarihinde Harbs yazdı:
A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

HTH,
Harbs

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:
You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.
 
The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.
 
HTH,
-Alex
 
 

Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
As I mentioned in the preceding  mail, I could not solve the error.
I am trying to get deeper by disabling inner components.

Now, I am getting an error



for component 

child = mx.controls.listClasses.ListItemRenderer

at the line 2724 of UIComponenet.js that the method is "getExplicitOrMeasuredWidth()" undefined.



This may be a misuse or bug ?

Thanks,
Serkan

23.09.2019 12:27 tarihinde Serkan Taş yazdı:
I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :



data array content :





23.09.2019 10:33 tarihinde Harbs yazdı:
A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

HTH,
Harbs

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:
You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.
 
The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.
 
HTH,
-Alex
 
 


Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Alex Harui-2

Not sure about your latest error.  If the TabBar buttons end up being Royale Basic components instead of MXRoyale components you will get problems like this, but we’ve also seen that the code was already set up like this but some sizing thing didn’t get triggered in our tests.

 

Regarding your original problem, did you try using the debugger as I suggested?  Learning how to use the debugger is worth it, IMO.  Modern cars have fault codes for a reason.  It is far faster and cheaper to check a fault code and replace the right part than to guess as what part to replace.  Same for a debugger.  It can help you find the part to replace with far less guessing.

 

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Sunday, September 29, 2019 at 6:27 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

As I mentioned in the preceding  mail, I could not solve the error.
I am trying to get deeper by disabling inner components.

Now, I am getting an error



for component 

child = mx.controls.listClasses.ListItemRenderer

at the line 2724 of UIComponenet.js that the method is "getExplicitOrMeasuredWidth()" undefined.



This may be a misuse or bug ?

Thanks,
Serkan

23.09.2019 12:27 tarihinde Serkan Taş yazdı:

I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :



data array content :





23.09.2019 10:33 tarihinde Harbs yazdı:

A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

 

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

 

HTH,

Harbs

 

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

 

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:

You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.

 

The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.

 

HTH,

-Alex

 

 

 



Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
Hi Alex,

It is related with TabBar. I am going to work on simplify the case for specifically of TabBar.

If we talk about the original problem;

I can use debugger, believe me, for over 20 years I use some kind :) Only the language is not js mostly.

Maybe it is better to leave this one for later, because it is very complex - advanced grid -  and deeply nested in the layout of my project.

Thanks,
Serkan

30.09.2019 19:57 tarihinde Alex Harui yazdı:

Not sure about your latest error.  If the TabBar buttons end up being Royale Basic components instead of MXRoyale components you will get problems like this, but we’ve also seen that the code was already set up like this but some sizing thing didn’t get triggered in our tests.

 

Regarding your original problem, did you try using the debugger as I suggested?  Learning how to use the debugger is worth it, IMO.  Modern cars have fault codes for a reason.  It is far faster and cheaper to check a fault code and replace the right part than to guess as what part to replace.  Same for a debugger.  It can help you find the part to replace with far less guessing.

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Sunday, September 29, 2019 at 6:27 AM
To: [hidden email] [hidden email]
Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

As I mentioned in the preceding  mail, I could not solve the error.
I am trying to get deeper by disabling inner components.

Now, I am getting an error



for component 

child = mx.controls.listClasses.ListItemRenderer

at the line 2724 of UIComponenet.js that the method is "getExplicitOrMeasuredWidth()" undefined.



This may be a misuse or bug ?

Thanks,
Serkan

23.09.2019 12:27 tarihinde Serkan Taş yazdı:

I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :



data array content :





23.09.2019 10:33 tarihinde Harbs yazdı:

A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

 

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

 

HTH,

Harbs

 

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

 

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:

You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.

 

The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.

 

HTH,

-Alex

 

 

 




Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Alex Harui-2

If you can host a test case on a server, we can try to run it in our debuggers and then it doesn’t have to be quite as simple.

 

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Monday, September 30, 2019 at 12:27 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

Hi Alex,

It is related with TabBar. I am going to work on simplify the case for specifically of TabBar.

If we talk about the original problem;

I can use debugger, believe me, for over 20 years I use some kind :) Only the language is not js mostly.

Maybe it is better to leave this one for later, because it is very complex - advanced grid -  and deeply nested in the layout of my project.

Thanks,
Serkan

30.09.2019 19:57 tarihinde Alex Harui yazdı:

Not sure about your latest error.  If the TabBar buttons end up being Royale Basic components instead of MXRoyale components you will get problems like this, but we’ve also seen that the code was already set up like this but some sizing thing didn’t get triggered in our tests.

 

Regarding your original problem, did you try using the debugger as I suggested?  Learning how to use the debugger is worth it, IMO.  Modern cars have fault codes for a reason.  It is far faster and cheaper to check a fault code and replace the right part than to guess as what part to replace.  Same for a debugger.  It can help you find the part to replace with far less guessing.

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Sunday, September 29, 2019 at 6:27 AM
To: [hidden email] [hidden email]
Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

 

As I mentioned in the preceding  mail, I could not solve the error.
I am trying to get deeper by disabling inner components.

Now, I am getting an error



for component 

child = mx.controls.listClasses.ListItemRenderer

at the line 2724 of UIComponenet.js that the method is "getExplicitOrMeasuredWidth()" undefined.



This may be a misuse or bug ?

Thanks,
Serkan

23.09.2019 12:27 tarihinde Serkan Taş yazdı:

I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :



data array content :





23.09.2019 10:33 tarihinde Harbs yazdı:

A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

 

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

 

HTH,

Harbs

 

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

 

Thanks Alex, just to be sure, can you see the images attached ?


23.09.2019 08:40 tarihinde Alex Harui yazdı:

You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.

 

The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.

 

HTH,

-Alex

 

 

 






Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş

Ok Alex, I am going to work on finding a server to host my application  
and than let you know.

Thanks,
Serkan

Alıntı Alex Harui <[hidden email]>:

> If you can host a test case on a server, we can try to run it in our  
> debuggers and then it doesn’t have to be quite as simple.
>
> -Alex
>
> From: Serkan Taş <[hidden email]>
> Reply-To: "[hidden email]" <[hidden email]>
> Date: Monday, September 30, 2019 at 12:27 PM
> To: "[hidden email]" <[hidden email]>
> Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a  
> constructor
>
> Hi Alex,
>
> It is related with TabBar. I am going to work on simplify the case  
> for specifically of TabBar.
>
> If we talk about the original problem;
>
> I can use debugger, believe me, for over 20 years I use some kind :)  
> Only the language is not js mostly.
>
> Maybe it is better to leave this one for later, because it is very  
> complex - advanced grid -  and deeply nested in the layout of my  
> project.
>
> Thanks,
> Serkan
> 30.09.2019 19:57 tarihinde Alex Harui yazdı:
> Not sure about your latest error.  If the TabBar buttons end up  
> being Royale Basic components instead of MXRoyale components you  
> will get problems like this, but we’ve also seen that the code was  
> already set up like this but some sizing thing didn’t get triggered  
> in our tests.
>
> Regarding your original problem, did you try using the debugger as I  
> suggested?  Learning how to use the debugger is worth it, IMO.  
> Modern cars have fault codes for a reason.  It is far faster and  
> cheaper to check a fault code and replace the right part than to  
> guess as what part to replace.  Same for a debugger.  It can help  
> you find the part to replace with far less guessing.
>
> -Alex
>
> From: Serkan Taş  
> <[hidden email]><mailto:[hidden email]>
> Reply-To: "[hidden email]"<mailto:[hidden email]>  
> <[hidden email]><mailto:[hidden email]>
> Date: Sunday, September 29, 2019 at 6:27 AM
> To: "[hidden email]"<mailto:[hidden email]>  
> <[hidden email]><mailto:[hidden email]>
> Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a  
> constructor
>
> As I mentioned in the preceding  mail, I could not solve the error.
> I am trying to get deeper by disabling inner components.
>
> Now, I am getting an error
>
> [cid:image001.png@01D577D9.3261B390]
>
> for component
>
> child = mx.controls.listClasses.ListItemRenderer
>
> at the line 2724 of UIComponenet.js that the method is  
> "getExplicitOrMeasuredWidth()" undefined.
>
> [cid:image002.png@01D577D9.3261B390]
>
> This may be a misuse or bug ?
>
> Thanks,
> Serkan
> 23.09.2019 12:27 tarihinde Serkan Taş yazdı:
> I tried removing "excludeFrom" but failed with the same error Harbs.
>
> Here is the debug view of the step which throws exception :
>
> [cid:image003.png@01D577D9.3261B390]
>
> data array content :
> [cid:image004.png@01D577D9.3261B390]
>
> [cid:image005.png@01D577D9.3261B390]
> [cid:image006.png@01D577D9.3261B390]
>
> [cid:image007.png@01D577D9.3261B390]
> 23.09.2019 10:33 tarihinde Harbs yazdı:
> A likely cause of the problem is the “excludeFrom” piece. Definitely  
> try to narrow that down.
>
> I’ve bumped into issues using “includeIn” in the past, and there’s  
> likely still bugs related to states. I generally use state.visible  
> instead of includeIn.
>
> HTH,
> Harbs
>
> On Sep 23, 2019, at 8:45 AM, Serkan Taş  
> <[hidden email]<mailto:[hidden email]>>  
> wrote:
>
> Thanks Alex, just to be sure, can you see the images attached ?
>
>
> 23.09.2019 08:40 tarihinde Alex Harui yazdı:
> You’ll have to catch the exception in the debugger and find out what  
> “cls” is supposed to be.  That section of code could be run quite  
> often when setting up an MXML-based UI.
>
> The MXMLDataInterpreter is interpreting a data array from some .JS  
> file representing an MXML file, and initializeStrandBasedObject is  
> trying to initialize some component and probably calls  
> generateMXMLObject to create some object that initializes some  
> property.  You’ll have to figure out what was in the data arrays and  
> what went wrong.  You should find that generateMXMLObject is passed  
> a data array that is part of a different array passed to  
> initializedStrandBasedObject.  Knowing what class that  
> strandBasedObject is may help you figure out what part of what MXML  
> is having a problem.
>
> HTH,
> -Alex


--
Serkan Taş
Mobil : +90 532 250 07 71
Likya Bilgi Teknolojileri
ve İletişim Hiz. Ltd. Şti.
www.likyateknoloji.com

--------------------------------------
Bu elektronik posta ve onunla iletilen bütün dosyalar gizlidir. Sadece  
yukarıda isimleri belirtilen kişiler arasında özel haberleşme amacını  
taşımaktadır. Size yanlışlıkla ulaşmışsa bu elektonik postanın  
içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız  
kesinlikle yasaktır. Lütfen mesajı geri gönderiniz ve sisteminizden  
siliniz. Likya Bilgi Teknolojileri ve İletişim Hiz. Ltd. Şti. bu  
mesajın içeriği ile ilgili olarak hiç bir hukuksal sorumluluğu kabul  
etmez.

This electronic mail and any files transmitted with it are intended  
for the private use of  the persons named above. If you received this  
message in error, forwarding, copying or use of any of the information  
is strictly prohibited. Please immediately notify the sender and  
delete it from your system. Likya Bilgi Teknolojileri ve İletişim Hiz.  
Ltd. Şti. does not accept legal responsibility for the contents of  
this message.
--------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
Hi Alex,

I registered to google cloud and created a single virtual machine to  
execute my application. I hope it is going to be ready at the end of  
next week, until I'am not available.

After, I will share the url of the application for your check.

Thanks,
Serkan

Alıntı [hidden email]:

> Ok Alex, I am going to work on finding a server to host my  
> application and than let you know.
>
> Thanks,
> Serkan
>
> Alıntı Alex Harui <[hidden email]>:
>
>> If you can host a test case on a server, we can try to run it in  
>> our debuggers and then it doesn’t have to be quite as simple.
>>
>> -Alex
>>
>> From: Serkan Taş <[hidden email]>
>> Reply-To: "[hidden email]" <[hidden email]>
>> Date: Monday, September 30, 2019 at 12:27 PM
>> To: "[hidden email]" <[hidden email]>
>> Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a  
>> constructor
>>
>> Hi Alex,
>>
>> It is related with TabBar. I am going to work on simplify the case  
>> for specifically of TabBar.
>>
>> If we talk about the original problem;
>>
>> I can use debugger, believe me, for over 20 years I use some kind  
>> :) Only the language is not js mostly.
>>
>> Maybe it is better to leave this one for later, because it is very  
>> complex - advanced grid -  and deeply nested in the layout of my  
>> project.
>>
>> Thanks,
>> Serkan
>> 30.09.2019 19:57 tarihinde Alex Harui yazdı:
>> Not sure about your latest error.  If the TabBar buttons end up  
>> being Royale Basic components instead of MXRoyale components you  
>> will get problems like this, but we’ve also seen that the code was  
>> already set up like this but some sizing thing didn’t get triggered  
>> in our tests.
>>
>> Regarding your original problem, did you try using the debugger as  
>> I suggested?  Learning how to use the debugger is worth it, IMO.  
>> Modern cars have fault codes for a reason.  It is far faster and  
>> cheaper to check a fault code and replace the right part than to  
>> guess as what part to replace.  Same for a debugger.  It can help  
>> you find the part to replace with far less guessing.
>>
>> -Alex
>>
>> From: Serkan Taş  
>> <[hidden email]><mailto:[hidden email]>
>> Reply-To: "[hidden email]"<mailto:[hidden email]>  
>> <[hidden email]><mailto:[hidden email]>
>> Date: Sunday, September 29, 2019 at 6:27 AM
>> To: "[hidden email]"<mailto:[hidden email]>  
>> <[hidden email]><mailto:[hidden email]>
>> Subject: Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a  
>> constructor
>>
>> As I mentioned in the preceding  mail, I could not solve the error.
>> I am trying to get deeper by disabling inner components.
>>
>> Now, I am getting an error
>>
>> [cid:image001.png@01D577D9.3261B390]
>>
>> for component
>>
>> child = mx.controls.listClasses.ListItemRenderer
>>
>> at the line 2724 of UIComponenet.js that the method is  
>> "getExplicitOrMeasuredWidth()" undefined.
>>
>> [cid:image002.png@01D577D9.3261B390]
>>
>> This may be a misuse or bug ?
>>
>> Thanks,
>> Serkan
>> 23.09.2019 12:27 tarihinde Serkan Taş yazdı:
>> I tried removing "excludeFrom" but failed with the same error Harbs.
>>
>> Here is the debug view of the step which throws exception :
>>
>> [cid:image003.png@01D577D9.3261B390]
>>
>> data array content :
>> [cid:image004.png@01D577D9.3261B390]
>>
>> [cid:image005.png@01D577D9.3261B390]
>> [cid:image006.png@01D577D9.3261B390]
>>
>> [cid:image007.png@01D577D9.3261B390]
>> 23.09.2019 10:33 tarihinde Harbs yazdı:
>> A likely cause of the problem is the “excludeFrom” piece.  
>> Definitely try to narrow that down.
>>
>> I’ve bumped into issues using “includeIn” in the past, and there’s  
>> likely still bugs related to states. I generally use state.visible  
>> instead of includeIn.
>>
>> HTH,
>> Harbs
>>
>> On Sep 23, 2019, at 8:45 AM, Serkan Taş  
>> <[hidden email]<mailto:[hidden email]>>  
>> wrote:
>>
>> Thanks Alex, just to be sure, can you see the images attached ?
>>
>>
>> 23.09.2019 08:40 tarihinde Alex Harui yazdı:
>> You’ll have to catch the exception in the debugger and find out  
>> what “cls” is supposed to be.  That section of code could be run  
>> quite often when setting up an MXML-based UI.
>>
>> The MXMLDataInterpreter is interpreting a data array from some .JS  
>> file representing an MXML file, and initializeStrandBasedObject is  
>> trying to initialize some component and probably calls  
>> generateMXMLObject to create some object that initializes some  
>> property.  You’ll have to figure out what was in the data arrays  
>> and what went wrong.  You should find that generateMXMLObject is  
>> passed a data array that is part of a different array passed to  
>> initializedStrandBasedObject.  Knowing what class that  
>> strandBasedObject is may help you figure out what part of what MXML  
>> is having a problem.
>>
>> HTH,
>> -Alex
>
>
> --
> Serkan Taş
> Mobil : +90 532 250 07 71
> Likya Bilgi Teknolojileri
> ve İletişim Hiz. Ltd. Şti.
> www.likyateknoloji.com
>
> --------------------------------------
> Bu elektronik posta ve onunla iletilen bütün dosyalar gizlidir.  
> Sadece yukarıda isimleri belirtilen kişiler arasında özel haberleşme  
> amacını taşımaktadır. Size yanlışlıkla ulaşmışsa bu elektonik  
> postanın içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve  
> kullanmanız kesinlikle yasaktır. Lütfen mesajı geri gönderiniz ve  
> sisteminizden siliniz. Likya Bilgi Teknolojileri ve İletişim Hiz.  
> Ltd. Şti. bu mesajın içeriği ile ilgili olarak hiç bir hukuksal  
> sorumluluğu kabul etmez.
>
> This electronic mail and any files transmitted with it are intended  
> for the private use of  the persons named above. If you received  
> this message in error, forwarding, copying or use of any of the  
> information is strictly prohibited. Please immediately notify the  
> sender and delete it from your system. Likya Bilgi Teknolojileri ve  
> İletişim Hiz. Ltd. Şti. does not accept legal responsibility for the  
> contents of this message.
> --------------------------------------


--
Serkan Taş
Mobil : +90 532 250 07 71
Likya Bilgi Teknolojileri
ve İletişim Hiz. Ltd. Şti.
www.likyateknoloji.com

--------------------------------------
Bu elektronik posta ve onunla iletilen bütün dosyalar gizlidir. Sadece  
yukarıda isimleri belirtilen kişiler arasında özel haberleşme amacını  
taşımaktadır. Size yanlışlıkla ulaşmışsa bu elektonik postanın  
içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız  
kesinlikle yasaktır. Lütfen mesajı geri gönderiniz ve sisteminizden  
siliniz. Likya Bilgi Teknolojileri ve İletişim Hiz. Ltd. Şti. bu  
mesajın içeriği ile ilgili olarak hiç bir hukuksal sorumluluğu kabul  
etmez.

This electronic mail and any files transmitted with it are intended  
for the private use of  the persons named above. If you received this  
message in error, forwarding, copying or use of any of the information  
is strictly prohibited. Please immediately notify the sender and  
delete it from your system. Likya Bilgi Teknolojileri ve İletişim Hiz.  
Ltd. Şti. does not accept legal responsibility for the contents of  
this message.
--------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Harbs
In reply to this post by Serkan Taş
The problem appears to be on line 44.

“non-simple” MXML entires should be an array, but your case is an empty array.

I’ve seen this happen when the wrong type is used in the MXML. What are you specifying for the itemRenderer? Is it a string instead of a reference?

I’ve created an issue that we should catch these errors at compile-time, but someone has to work on that… ;-)

HTH,
Harbs

On Sep 23, 2019, at 12:27 PM, Serkan Taş <[hidden email]> wrote:

I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :

<hofbadiapnfkgngg.png>

data array content :
<anbhmfojjnegbbma.png>

<eibffggjiaffciaa.png>
<oplijogleghgamec.png>

<macnpeoicbolbkih.png>
23.09.2019 10:33 tarihinde Harbs yazdı:
A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

HTH,
Harbs

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:
You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.
 
The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.
 
HTH,
-Alex
 
 


Reply | Threaded
Open this post in threaded view
|

Re: EventDispatcher.js:73 Uncaught TypeError: cls is not a constructor

Serkan Taş
Hi Harbs,

Today I after updating the repo, I can say that I can not see the exception in my console anymore. Still the layout is awful but no exception at all :)

I am going to work on to figure out what is going with layout.

If you and/or Alex like to have a look to the application, I can prepare the virtual server for you for the live application but I need a time interval  to start the virtual server on google cloud.

Thanks,
Serkan

2.10.2019 10:33 tarihinde Harbs yazdı:
The problem appears to be on line 44.

“non-simple” MXML entires should be an array, but your case is an empty array.

I’ve seen this happen when the wrong type is used in the MXML. What are you specifying for the itemRenderer? Is it a string instead of a reference?

I’ve created an issue that we should catch these errors at compile-time, but someone has to work on that… ;-)

HTH,
Harbs

On Sep 23, 2019, at 12:27 PM, Serkan Taş <[hidden email]> wrote:

I tried removing "excludeFrom" but failed with the same error Harbs.

Here is the debug view of the step which throws exception :

<hofbadiapnfkgngg.png>

data array content :
<anbhmfojjnegbbma.png>

<eibffggjiaffciaa.png>
<oplijogleghgamec.png>

<macnpeoicbolbkih.png>
23.09.2019 10:33 tarihinde Harbs yazdı:
A likely cause of the problem is the “excludeFrom” piece. Definitely try to narrow that down.

I’ve bumped into issues using “includeIn” in the past, and there’s likely still bugs related to states. I generally use state.visible instead of includeIn.

HTH,
Harbs

On Sep 23, 2019, at 8:45 AM, Serkan Taş <[hidden email]> wrote:

Thanks Alex, just to be sure, can you see the images attached ?

23.09.2019 08:40 tarihinde Alex Harui yazdı:
You’ll have to catch the exception in the debugger and find out what “cls” is supposed to be.  That section of code could be run quite often when setting up an MXML-based UI.
 
The MXMLDataInterpreter is interpreting a data array from some .JS file representing an MXML file, and initializeStrandBasedObject is trying to initialize some component and probably calls generateMXMLObject to create some object that initializes some property.  You’ll have to figure out what was in the data arrays and what went wrong.  You should find that generateMXMLObject is passed a data array that is part of a different array passed to initializedStrandBasedObject.  Knowing what class that strandBasedObject is may help you figure out what part of what MXML is having a problem.
 
HTH,
-Alex