You should put your function inside of statics : {}

qx.Class.define("analysis.util.SummaryJSON",

{

  extend : qx.core.Object,

  construct : function(data) {

    this._data = data;

  },



  members :

  {

    getTestData : function() { return this._data.testData }

  },

  statics:

{

function printTestData(summary) {

  var x = summary.getTestData();

        console.log(x);

}

}

});





On Thu, Mar 25, 2010 at 3:01 PM, Joe Noon <[email protected]> wrote:

> > So I created a seperate class file for my application
> > (analysis/util/SummaryJSON.js). I'm trying to create a JSON accessor
> class,
> > so I lifted the code from the example and have it below.  I next try to
> > access this in my Application.JS file but end up with a JS error in
> FireBug
> > saying that 'analysis.util.SummaryJSON.printTestData' is not a function.
> > Any insight would be useful, seems pretty trivial in the documentation
> but
> > haven't had any luck.
>
> In what you currently have printTestData is just a global function on
> window.  Its not currently related to the class.  You could currently
> use it as:
>
> printTestData(new analysis.util.SummaryJSON(summaryDataList));
>
> Or you could make it a member function and change the code a bit.
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to