| Property | Value |
| Name: | Method Wrappers |
| Description: |
WARNING: Incorrectly using the wrappers can crash your image, so you should save your image before using them. Most problems occur as a result of installing them on methods that are called either in thebeforeMethod or afterMethod which results in infinite recursion.
User Instructions:To install the method wrappers, simply parcel-in the MethodWrapperBase.pcl file from MethodWrappers.zip into a VisualWorks image. The other files can be parceled-in in any order or not at all. Both the Synchronization Wrappers and the Method Wrapper Example parcels have examples of specialized method wrappers. The Synchronization Wrappers can be used to synchronize messages on an object. Once loaded you can send the #synchronize messages to any object to synchronize all messages to that object. The other two parcels, Coverage Tool and Interaction Diagram, have their own pages of documentation. To use a method wrapper, send the class an on:inClass: message to the class of the method wrapper you want to create. The first argument is the selector for the method, and the second is the class that defines the method. This returns a new method wrapper which can then be installed the by sending the install message and uninstalled by sending uninstall message. To create a new type of method wrapper, you must create a subclass of MethodWrapper and redefine the beforeMethod and/or afterMethod to add your specific behavior for the wrapper. If you only need to redefine the beforeMethod, you can redefine the valueFrom:arguments: method instead (see the CountMethodWrapper). This is somewhat faster since it doesn't need to create two blocks and send the valueNowOrOnUnwindDo: message.
Bugs/Limitations:
|
| Filename: | MethodWrappers.zip |
| Filesize: | 44.98 kB |
| Filetype: | zip (Mime Type: application/zip) |
| Created On: | 01/01/1998 00:00 |
| Hits: | 169 Hits |
| Homepage: |
7 Florida Drive Urbana, IL 61801
Phone: 1-217-239-2633
Email:
This e-mail address is being protected from spambots. You need JavaScript enabled to view it.