I have one javasctipc class... Lets call it X.
myClass = new X(bunc, of, stuff);
Then i have method like:
X.prototype.drawTripOnMap = function(request) {
...
var y = new ChartClass();
//or this.chart = new ChartClass():
y.drawchart(data, options, etc);
...
}
Now i dont want to create new instance of X - How can i, within ChartClass.drawchart method call myClass methods?
to give you bit more info about my problem - im writing pure javascript class which handles bunch of OpenLayer stuff. My website uses prototype.js atm, but we want to get rid of that. We cant do it right away, so im tryng to write my class so that i could easyly swap out parts that handle dom, events or ajax calls. right now im drawin charts below the map and i need to handle chart click events. When i click on chart, something needs to happen on map... vice versa is simple - since chart can be subclass of myClass (this.chart in above code).
soo... how?
Alan