You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to combine requirejs with jsface and i have a strange behavior.
Consider this simple project example layout:
+app/
+core/
Person.js
Student.js
I have created two classes declared in two seperate modules defined with requirejs:
Person.js:
define(["jsface"], function() {
Class = jsface.Class, extend = jsface.extend;
var Person = Class(
{constructor : function(name, age) {
this.name = name;
this.age = age;
},
});return Person;};
when i use Student class constructor it fails on: Student.$super.call(this,name,age); the error thrown is "$super" is not a function.
It works well if i move the Person class declaration in the same requirejs module (inside the define function of Student.js...).
It would be nice to know if this is a normal behavior or there is a jsface problem such as requirejs incompatibility.
Thanks in advance.
Luigi
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to combine requirejs with jsface and i have a strange behavior.
Consider this simple project example layout:
+app/
+core/
Person.js
Student.js
I have created two classes declared in two seperate modules defined with requirejs:
Person.js:
Studen.js:
when i use Student class constructor it fails on: Student.$super.call(this,name,age); the error thrown is "$super" is not a function.
It works well if i move the Person class declaration in the same requirejs module (inside the define function of Student.js...).
It would be nice to know if this is a normal behavior or there is a jsface problem such as requirejs incompatibility.
Thanks in advance.
Luigi
The text was updated successfully, but these errors were encountered: