Anonymous user
Add a variable to a class instance at runtime: Difference between revisions
Add a variable to a class instance at runtime (view source)
Revision as of 20:37, 22 June 2012
, 11 years ago→Dynamic Method Definitions: (sub)Header!
(→Unknown Method Access: Header!) |
(→Dynamic Method Definitions: (sub)Header!) |
||
Line 527:
</lang>
===Dynamic Method Definitions===
An object may be written that can dynamically add methods to itself. This example is similar to the above example, but the UNKNOWN method attaches a getter/setter pair of methods for the name triggering the UNKNOWN call. On all subsequent calls, the attribute methods will get called.
<lang ooRexx>
|