Can you try to explain more what you're trying to do? Typically you don't want one class coupled with another, they should be able to exist independently.

The exception of course is when you use Implements or Extends. I wonder if you could explain better what you're trying to do, we could figure out that you simply need to extend or implement one of the classes with the other.


Ryan Florence

[Writing TextMate Snippets] ( http://blog.flobro.com/ )

On Oct 28, 2009, at 7:24 PM, mmjaeger 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