Welcome, Guest
  • Author Topic: A way to dynamically tell which classes have accessed a class?  (Read 552 times)

    404Assassin

    • Jr. Programmer
    • **
    • Posts: 68
      • View Profile
      • Christian Worley devlopment and design
    Does anyone know of a way to dynamically save a class reference? I have a class that I'm saving information to from several classes and I'd like to notify the same classes once an event happens. Is there a way to dynamically tell which classes have accessed this class and save those class references?

    thanks in advance for any help

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    This is how the Event mechanism works. Each class that saves data to your model subscribes to an Event (using addEventListener), then your model class dispatch an Event and all subscribers receives it, that's it.

    Jorge