Jump to content

c is not a constructor (File not found ColumnResizing.js) - ????


herculanojs

Recommended Posts

Delphi Developer: I also had this error ONLY in latest version (6.5) and I think it because the way that Extjs 6.5 works (MVC) and you must use 'requires' for the used class.

 

I mean if I use custom component of Extjs, for example: Ext.draw.Container it will through the same error unless you add the appropriate class in the 'requires'  of the App, and I don't know where to do that?

 

I already sent Farshad a PM about this, do you have any solution for that?

 

 

Example code: try to execute this in the console while running your app

var drawContainer = Ext.create('Ext.draw.Container', {
    renderTo: Ext.getBody(),
    width:200,
    height:200,
    sprites: [{
        type: 'circle',
        fillStyle: '#79BB3F',
        r: 100,
        x: 100,
        y: 100
     }]
});

The error:

Uncaught TypeError: c is not a constructor
    at eval (eval at getInstantiator (ext-all.js:20), <anonymous>:3:8)
    at Object.create (ext-all.js:20)
    at <anonymous>:1:25

If I add 'unichart' to uses clause then it works fine :-)

Link to comment
Share on other sites

Sorry, but there is no way for us to help you with this little information.

 

Sent from my SM-N950F using Tapatalk

<br class="Apple-interchange-newline"><div id="inner-editor"></div>
 
 
 
439/5000
 
I can not help much because I do not know what is causing this. I just upgraded version 1412 to 1424 and started the problem. The only information I have is the information in the log pointing out the lack of this file FMSoft \ Framework \ unigui \ touch-2.4.2-complete \ src \ grid \ plugin \ ColumnResizing.js which I have already searched for and I do not find any reference. Also I am not using custom file that is referencing this file
Link to comment
Share on other sites

Farshad, in order to reproduce, I have to uninstall version 1412 and recompile everything involving the project, it does a certain job. I will see if I can install a virtual machine for this, so it does not affect my programming environment, because until then I was doing directly in the production

 

Maybe Mohammad is easier to reproduce, because it has the same problem

Link to comment
Share on other sites

You can run my code directly in browser console. I already mentioned that in Extjs 6.x there is 'requires' section in app.js that you define what to load it and it is similar to the 'uses' in delphi. Is there any way to do that in unigui.

Link to comment
Share on other sites

  • Administrators

You can run my code directly in browser console. I already mentioned that in Extjs 6.x there is 'requires' section in app.js that you define what to load it and it is similar to the 'uses' in delphi. Is there any way to do that in unigui, and we still stuck with this error.

 

Problem here is that library ColumnResizing.js is already embedded in file sencha-touch-grid.js, there should be no reason for Ext JS to demand it to be loaded.

Link to comment
Share on other sites

With Farshad's help, we have been able to understand and solve the problem.

 

At first for some reason in some cases, js automatically adds some files that unigui executes, when you do not declare classes in main form uses.

In my case in particular, the application is all packaged in bpl, and since it was not making uses of the classes being loaded into the bpl, the corresponding js was not being loaded.

To solve the problem, I added in the uses references the classes in the main form of the project, and the problem was solved.

 

Thanks Farshad for the usual support

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...