Jump to content

Add a variable to a class instance at runtime: Difference between revisions

Line 484:
=={{header|ooRexx}}==
ooRexx does not directly expose instance variables to callers. Encapsulated access to instance variables is done via accesser methods for assignment and retrieval. In general, it is not possible to just dynamically add support, but it is possible to construct a class that allows for this to happen.
===Unknown Method Access===
This example traps unknown method calls, then sets or retrieves the values in an encapsulated directory object.
<lang ooRexx>
Line 525:
self~init:.dynamicvar
 
</lang>
 
==Dynamic Method Definitions==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.