> 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 <
[hidden email]> 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.