home *** CD-ROM | disk | FTP | other *** search
- #import "IBMole.h"
-
- @interface Object(Superfy)
- -becomeSuperclass;
- @end
-
- @implementation Object(Superfy)
- -becomeSuperclass
- { //this was helpful in turning SmartFields into TextFields..
- //in general isa hacking is frowned upon...
- //changing yourself to a subclass can really screw things up!
- self->isa = [self superclass];
- return self;
- }
- @end
- @implementation IBMole
-
- -init
- {
- docList = [[List alloc] init];
- tunnel = [NXConnection registerRoot:self withName:"IBMole"];
- [tunnel runFromAppKit];
- return self;
- }
-
- -ibApp
- {
- return NXApp;
- }
-
- -docList
- {
- id windowList;
- id delegate;
- int z;
-
- [docList empty];
- windowList = [NXApp windowList];
- z = [windowList count];
- while (z--)
- {
- delegate = [[windowList objectAt:z] delegate];
- if ([delegate respondsTo:@selector(document)])
- {
- [docList addObjectIfAbsent:[delegate document]];
- }
- }
- return docList;
- }
-
- @end
-