PDA

View Full Version : Generated workspace and package but still do not have access to the package



iamcootis
11 Jul 2014, 6:02 AM
I have gone through the steps to set up a package for my application.
My application had been generated before the workspace, not sure if that is the problem.

I then generated a 'debugger' package and added it to requires: in my app.json.

Inside the source I created a file called debugger.js and a function. It all looks like this:

Ext.define("debugger.debugger", {


secretAlert: function() {
alert('It worked');
}


});

I did a refresh of my application and then called secretAlert() from my application and it's not finding that function. Any idea what I'm doing wrong?

mitchellsimoens
16 Jul 2014, 11:02 AM
It may be possible that your application is not realizing it's in a workspace. First question would be did you add the package to the requires array of your app.json? Is there a directory at .sencha/workspace/ within your application (not the workspace)?

iamcootis
18 Jul 2014, 8:03 AM
Yes, app.json is requiring the package.

I tried adding it to my current application and it's in this structure.



wksp/
.sencha/
app/
worksspace/
app/
app.js
packages/
debugger/
ext/




I then tried to created a new application from scratch in this structure and still had the same problem



wksp/
.sencha/
workspace/
ext/
packages/
MyApps/
.sencha/
app/
app/
packages/
debugger/