1 Reply Latest reply on Jul 9, 2007 7:12 AM by levancho

    introspecition for classes that  Implement interface XXX

    levancho Level 3
      I hava about 20 containers on different levels some nested inside other,
      and some of the containers implement an Interface IMyinteface.

      what I am looking for is the most efficient way to do introspection from Application.application to traverse down all containers and get reference for ones that implement IMyInterface, I have so far have not had luck on getting desired result , can anyone share how can I achieve that reasonably sane way without any performance impact or at list with minimal performance impact?

      I tried this :

      var containers:Array = this.getChildren();
      for (var i in containers) {
      if(i is IMyInterface) {
      Alert.show("lalala ");
      }

      but this only searches direct children as I understand, so without recursive looping (which I really like to avoid) I cant get it to work .