On Fri, Jul 18, 2008 at 9:41 AM, Rick McGuire <[EMAIL PROTECTED]> wrote: > We had a discussion a while back about the adding an implementation of > a class that will retrieve the current execution context via the > environment variable .CONTEXT. This now implemented in trunk, and > here's the initial set of things I allow you to access via .CONTEXT:
Looks good Rick. ... > - variables Returns a supplier that allows iteration through all of > the current variables. This only returns top-level variables (i.e., > simple variables and stems). Compound variables, of course, can be > accessed by using stem object values associated with a stem variable. By top-level variables, you just mean not compound variables, right? In other words arrays, directories, etc.. are all top-level? > Some notes. > > 1) Currently, these are "read-only" values. I'm not sure I'm > prepared to start down the slipperly slope of allowing this object to > be used to changes settings/variables. I'm not totally opposed to it, > but I'm erring on the side of caution for now. This class makes it > fairly easy to add those capabilities in the future if we decide this > would be a good thing. I think that is a good plan. Let's not start down the slippery slope until after 4.0.0. Maybe later we can create a sandbox area where you implement the function of allowing the settings / variables to be changed. Then Moritz, myself, and maybe some others that are interested could build from that sandbox to play around with it. To see if we shoot ourselves in the foot or not. <grin> > 2) The object returned by .CONTEXT is only valid as long as the > context it was retrieved from is active. Invoking any of the > RexxContext methods will raise an error if that context has been > terminated. Basically, this would mean within the scope of a method or routine? Or is the context a whole program? Say you had something like contextObj = .Context t = .Talker~new t~passObj(contextObj) context = t~passBackObj ? context good? ::class 'Talker' ::method passObj use strict arg myContext ? myContext good? ::method passBackObj context = .Context return context Is the .Context in a method just good withing that local scope of the method? Is the .Context at the top-level scope of the program, not good within the method? Also, you had talked about this .Context object being available to external functions written using the native API. (I think you did, maybe I don't remember correctly.) How would you access it? It is not the context object that is passed automatically to the REXX_METHOD methods is it? (Or is it?) -- Mark Miesfeld ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
