Hi folks. I want to intercept (and do something) for all objects. I know few approaches, for example:
hi Mariano,
I tried something similar, but I haven't found a satisfactory solution.
1) using method wrappers (implementing run: aSelector with: arguments in: aReceiver) I can wrap all compiled methods of all classes and there I have the receiver.
You can wrap most of the compiled methods in the system. Not all of them, so you will have find out which one you can safely wrap. Wrapping and unwrapping all classes takes a bit of times (1-2 seconds on my machine). I therefore used MessageTally to find out what I exactly need to wrap. This is not perfect (MessageTally uses a sampling profiling after all). But it is fine for now.
2) become all objects to some kind of hacky object that stores the original object and that redefines the doesNotUnderstand:
If you succeed, let me know. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
