If your class Cover needs Site to operate then it should implement it. It
will have all the methods and properties. I think the data model you're
using has a "specification error". We'll be able to help you after we'd get
a glimpse what are you writing and what language problem you met.
Your problem might be "fixed" with a not nice method by providing the cover
parameter "this" as an argument.
var Cover = new Class({
  initialize: function (site) {
    this.site = site;
  },
  cover: function() {
    this.site.setParameters();
  }
});

And instantiate cover with
var cover = new Cover(this)

On 29 Oct 2009 01:25, "mmjaeger" <[email protected]> wrote:


Hello

I've got the following code:
var Cover = new Class({

       cover: function() {

               ????? call to setProperties function in Site Class?
       }

})

var Site= = new Class({

       var cover = new Cover();

       setProperties: function() {

       }
})

the Site Class initiates the Cover class - upon finishing the cover
function, I'd like to call the setProperties function in the Site
Class - I was trying to provide a callback function to new Cover
({callback: ....}) but that didn't work either.
What's the best way to do this.
Thank you in advance for your input.

Reply via email to