We're using the Ext.Loader system during development so we can quickly see javascript changes by simply pressing refresh in the browser -- all the individual javascript files are loaded individually as indicated by ExtJS requires statements. However, the requires statements are supposed to indicate class ID's created using Ext.define().
I have a HelloWorld.js class containing the following GluJS example:
glu.defModel('Svmc.home.glu.HelloWorld', {
arriving:true,
message$:function () {
return this.arriving ? 'greeting' : 'farewell';
}
});
glu.defView('Svmc.home.glu.HelloWorld', {
title:'@{message}',
items:[
{
xtype:'button',
text:'test',
enableToggle:true,
pressed:'@{arriving}'
}
]
});
So there is no explicit Ext.define() here. I put 'Svmc.home.glu.HelloWorld' in a requires statement, and the Ext.Loader will load it okay if the folder structure matches, but SenchaCmd will return an error. We use SenchaCmd to concatenate all our javascript files into one for the production environment. It failed to complete with an error saying "Failed to find any files for ClassRequire 'Svmc.home.glu.HelloWorld'." So we can fool Ext.Loader without Ext.define() but we can't fool SenchaCmd.
Am I missing an obvious solution here? This is a barrier for us adopting GluJS...
Thanks,
Sharon
--
You received this message because you are subscribed to the Google Groups "GluJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glujs+un...@googlegroups.com.
To post to this group, send email to gl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glujs/1dcceb92-5178-4396-a96c-bb00111cee25%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "GluJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glujs/XaprCIi0c4Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glujs+un...@googlegroups.com.
To post to this group, send email to gl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glujs/CAMT%2BkPsGgUtF88Sx3o6OKYTeFWGDx-rAjnuLwJF0uXJ-b8%3DUvw%40mail.gmail.com.
I've tried to get cmd to be helpful several times, but it only seems to recognize "Ext.define('A.string.Literal', { ... stuff ...})".
You can't even do:
var myCls = 'A.string.Literal';
Ext.define(myCls, { ... stuff ... });
Nor can you do:
var mySpec = { ... stuff ... };
Ext.define('A.string.Literal', mySpec);
You also cannot use code generation and expect cmd to understand it. Cmd is frustratingly stupid.
I could be wrong on this. I posted on the forum about this sort of thing and got little response. Maybe Cmd can be made to be more intelligent--I hope someone proves me wrong.