Add a variable to a class instance at runtime: Difference between revisions
Content added Content deleted
(→Unknown Method Access: Header!) |
(→Dynamic Method Definitions: (sub)Header!) |
||
Line 527: | Line 527: | ||
</lang> |
</lang> |
||
==Dynamic Method Definitions== |
===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. |
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> |
<lang ooRexx> |