Problem with depend

Hello,

I am starting having a headache with depend. My app won't start whatever I do because enyo don't find my Kinds.
Here is my structure :
\enyo
\lib
\source
module1\
module1kind.js
package.js
module2\
module2kind.js
package.js
app.js
package.js
index.html
depends.js
depends.js
enyo.depends(	
"source"
);
source\package.js
enyo.depends(
"module1",
"module2",
"app.js"
);
index.html
<html><head>
<title>My App</title>
<script src="enyo/enyo.js"></script>
<script src="depends.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
enyo.create({kind: "App"}).renderInto(document.body);
</script>
</body>
</html>
Error :
no constructor found for kind "App" log.js:41
Uncaught TypeError: Object [object Object] has no method 'renderInto' index.html:8
GET file:///C:/Users/remy.d/Documents/Workspaces/MyProject/enyo/source/ui/source/package.js boot.js:53
Can you help ?

Thanks !


Comments

  • I assume the package.js files in the module dirs are correct?

    What happens if you change depends.js to package.js (file name and reference in index.html)?

    It also appears as if it's trying to look in the wrong place for your source dir. It looks like it wants to find it in the Enyo core source/ui directory which is not a good thing.

    Is this a bootplate repo or a project you started from scratch?
  • The enyo.depends() code relies on the file being named package.js or ending with -package.js. This is because it searches for the script tag in the page to append more script tags after it.
  • Hi guys,

    Renaming the main depends.js to package.js seems to have resolved the problem thanks ! I think I kept this naming from a project of the old webOS days :)

    Working on several Tizen apps right now and Enyo 2 works like a charm, keep up the good work !

    Rémy
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter