Thanks Aaron - that's what I figured out at the end from looking at some clientcide code.
Once again thanks everybody for helping out On Oct 29, 8:34 am, Aaron Newton <[email protected]> wrote: > typically this kind of problem is handled with events. Your Cover class has > an "onFoo" event, then your Site class, which instantiates Cover, attaches > an "onFoo" event handler. > > > > On Thu, Oct 29, 2009 at 7:18 AM, Ryan Florence <[email protected]> wrote: > > > 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.
