Re: [RexxLA] Package class - documentation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [RexxLA] Package class - documentation

ThSITC
Hello Gil, Jon, and all:

What RONY is doing there is obviously the *big advantage* of ooRexx (as
compared to NetRexx),
as you can do anything in ooRexx DYNAMICALLY (which you can't do in
current NetRexx, by the way :-()

And yes, friends, and enemies,

I'm again CROSS-Posting this to ibm-netRexx, because my *opinion* is that
Dynamicallity (or whatever is the correct english term) should be the
*next major step* in NetRexx!!! :-)

Anyway, happy and prosperous 2012 for you all, at both groups!

Massa Thomas.
==================================================================================


Am 28.12.2011 18:53, schrieb Gil Barmwater:

> Hi Jon,
>
> I spent quite a bit of time playing with packages and discovered, via
> trial and error, some things that weren't obvious.
>
> In RGF_Util2, Rony does .context~package in the "start-up" code and then
> uses AddPublicRoutine to that package.  Apparently, those routines get
> added to the RGF_Util2 package and then it gets "loaded" by the
> "requiring" program so the added routines are available there too.  When
> I tried to do something similar "later", by executing the same code as a
> method of a public class in a "required" file, the added routine was NOT
> visible to the main program.  I finally ended up passing the .context of
> the main program to my method which got the package and added the
> routine.  It makes sense after I worked it out but it took a while to
> get there.
>
> HTH...
>
> Sahananda (Jon) Wolfers wrote:
>> Hi Rony,
>>
>> thanks for your help.  I hope you dont mind me asking some stupid
>> sounding questions, but I think that this will help me and others that
>> come along later.
>>
>> In RGF_Util2, you have written some methods, and then you dynamically
>> convert them to routines and add them to the package as public routines
>> (neat), but
>>
>> 1) Why do this instead of creating them as routines with the public
>> keyword in the first place.  Is there a difference?
>>
>> 2) Some script, lets call it BaseScript.Rex is going to require your
>> library rgf_util2.rex.  During the execution of rgf_util2.rex you
>> retrieve the package from the context and it's name is
>> '...\rgfutil2.rex'.  When BaseScript.Rex executes the code within it, it
>> could retrieve the package from the context and then the package name
>> would be '...\BaseScrpt.Rex'.  Are they the same package or different?
>>   If they are the same package, why does one not see the routines you
>> added in the publicRoutines collection?
>>
>> that's probably enough for now.
>>
>> thanks,
>>
>> Jon
>>
>>
>> On 27 December 2011 12:11, Rony G. Flatscher
>> <[hidden email]<mailto:[hidden email]>>  wrote:
>>
>>      Hi Jon,
>>
>>
>>      On 27.12.2011 07:35, Sahananda (Jon) Wolfers wrote:
>>
>>>      thanks for that.  It is good to have examples of interrogating the
>>>      package class.
>>      Also for using it to change the runtime environment of the package
>>      the code gets executed, which is the case when adding public
>>      routines and public classes to it!
>>
>>
>>>      However, what I am currently interested in finding out is how you
>>>      can use the package class to manage your environment, if indeed
>>>      that is what it is intended for.
>>      Yep, see example code below, e.g.
>>
>> ...
>> .context~package~addPublicRoutine(idx, routine)
>> ...
>> .context~package~addPublicClass("StringOfWords", .StringOfWords)
>> ...
>>
>>      After these statements each Rexx program that called or required
>>      "rgf_util2.rex" will see the just added routines and classes.
>>
>>
>>>      What particularly was on my mind is that I work with a couple of
>>>      applications (not Rexx ones) that implement the concept which for
>>>      want of a better term I will call code-layers.  So, for instance
>>>      there may be a layer for the authors of the software, another for
>>>      the reseller, another for the end-users' technical department, and
>>>      another for the end-user.  If a script is called, then the layers
>>>      are searched from the end-user's layer up towards the author's
>>>      layer until a script of that name is found.  That is then the
>>>      version of the script that is run.
>>      Using the package in those layers you are thinking about should
>>      allow you to do what you seek, you just need to adjust the direction
>>      (bottom-up or top-to-bottom resolution).
>>
>>      HTH,
>>
>>      ---rony
>>
>>
>>      _______________________________________________
>>      rexxla-members mailing list -- mailto:[hidden email]
>>      <mailto:[hidden email]>
>>      http://rice.safedataisp.net/mailman/listinfo/rexxla-members
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rexxla-members mailing list -- mailto:[hidden email]
>> http://rice.safedataisp.net/mailman/listinfo/rexxla-members


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: [RexxLA] Package class - documentation

measel
Once again you post before you read.  How do you say google in Austrian ?

Dynamic class loading in java: http://www.eng.cam.ac.uk/help/tpl/languages/java/javaplugins.html

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Schneider
Sent: Thursday, December 29, 2011 8:57 AM
To: RexxLA Members mailing list; IBM Netrexx
Subject: [Ibm-netrexx] Re: [RexxLA] Package class - documentation

Hello Gil, Jon, and all:

What RONY is doing there is obviously the *big advantage* of ooRexx (as
compared to NetRexx),
as you can do anything in ooRexx DYNAMICALLY (which you can't do in
current NetRexx, by the way :-()

And yes, friends, and enemies,

I'm again CROSS-Posting this to ibm-netRexx, because my *opinion* is that
Dynamicallity (or whatever is the correct english term) should be the
*next major step* in NetRexx!!! :-)

Anyway, happy and prosperous 2012 for you all, at both groups!

Massa Thomas.
==================================================================================


Am 28.12.2011 18:53, schrieb Gil Barmwater:

> Hi Jon,
>
> I spent quite a bit of time playing with packages and discovered, via
> trial and error, some things that weren't obvious.
>
> In RGF_Util2, Rony does .context~package in the "start-up" code and then
> uses AddPublicRoutine to that package.  Apparently, those routines get
> added to the RGF_Util2 package and then it gets "loaded" by the
> "requiring" program so the added routines are available there too.  When
> I tried to do something similar "later", by executing the same code as a
> method of a public class in a "required" file, the added routine was NOT
> visible to the main program.  I finally ended up passing the .context of
> the main program to my method which got the package and added the
> routine.  It makes sense after I worked it out but it took a while to
> get there.
>
> HTH...
>
> Sahananda (Jon) Wolfers wrote:
>> Hi Rony,
>>
>> thanks for your help.  I hope you dont mind me asking some stupid
>> sounding questions, but I think that this will help me and others that
>> come along later.
>>
>> In RGF_Util2, you have written some methods, and then you dynamically
>> convert them to routines and add them to the package as public routines
>> (neat), but
>>
>> 1) Why do this instead of creating them as routines with the public
>> keyword in the first place.  Is there a difference?
>>
>> 2) Some script, lets call it BaseScript.Rex is going to require your
>> library rgf_util2.rex.  During the execution of rgf_util2.rex you
>> retrieve the package from the context and it's name is
>> '...\rgfutil2.rex'.  When BaseScript.Rex executes the code within it, it
>> could retrieve the package from the context and then the package name
>> would be '...\BaseScrpt.Rex'.  Are they the same package or different?
>>   If they are the same package, why does one not see the routines you
>> added in the publicRoutines collection?
>>
>> that's probably enough for now.
>>
>> thanks,
>>
>> Jon
>>
>>
>> On 27 December 2011 12:11, Rony G. Flatscher
>> <[hidden email]<mailto:[hidden email]>>  wrote:
>>
>>      Hi Jon,
>>
>>
>>      On 27.12.2011 07:35, Sahananda (Jon) Wolfers wrote:
>>
>>>      thanks for that.  It is good to have examples of interrogating the
>>>      package class.
>>      Also for using it to change the runtime environment of the package
>>      the code gets executed, which is the case when adding public
>>      routines and public classes to it!
>>
>>
>>>      However, what I am currently interested in finding out is how you
>>>      can use the package class to manage your environment, if indeed
>>>      that is what it is intended for.
>>      Yep, see example code below, e.g.
>>
>> ...
>> .context~package~addPublicRoutine(idx, routine)
>> ...
>> .context~package~addPublicClass("StringOfWords", .StringOfWords)
>> ...
>>
>>      After these statements each Rexx program that called or required
>>      "rgf_util2.rex" will see the just added routines and classes.
>>
>>
>>>      What particularly was on my mind is that I work with a couple of
>>>      applications (not Rexx ones) that implement the concept which for
>>>      want of a better term I will call code-layers.  So, for instance
>>>      there may be a layer for the authors of the software, another for
>>>      the reseller, another for the end-users' technical department, and
>>>      another for the end-user.  If a script is called, then the layers
>>>      are searched from the end-user's layer up towards the author's
>>>      layer until a script of that name is found.  That is then the
>>>      version of the script that is run.
>>      Using the package in those layers you are thinking about should
>>      allow you to do what you seek, you just need to adjust the direction
>>      (bottom-up or top-to-bottom resolution).
>>
>>      HTH,
>>
>>      ---rony
>>
>>
>>      _______________________________________________
>>      rexxla-members mailing list -- mailto:[hidden email]
>>      <mailto:[hidden email]>
>>      http://rice.safedataisp.net/mailman/listinfo/rexxla-members
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rexxla-members mailing list -- mailto:[hidden email]
>> http://rice.safedataisp.net/mailman/listinfo/rexxla-members


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: [RexxLA] Package class - documentation

ThSITC
Hello RexxLA members,
    I'm cross-posting this (again!) as I obviously had have the
*insufficient info's* on my desk, and thus brain... :-(

As you can see from Mike Measels reply, DYNAMICS are already there in
Java, and thus NetRexx!

Massa Thomas.

PS: Mike Measal, you do really have NO Idea what I'm all reading to
complete my projects.

Sorry, nobody is perfect... :-(

Thomas.
==================================================================================

Am 29.12.2011 17:50, schrieb Measel, Mike:

> Once again you post before you read.  How do you say google in Austrian ?
>
> Dynamic class loading in java: http://www.eng.cam.ac.uk/help/tpl/languages/java/javaplugins.html
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Schneider
> Sent: Thursday, December 29, 2011 8:57 AM
> To: RexxLA Members mailing list; IBM Netrexx
> Subject: [Ibm-netrexx] Re: [RexxLA] Package class - documentation
>
> Hello Gil, Jon, and all:
>
> What RONY is doing there is obviously the *big advantage* of ooRexx (as
> compared to NetRexx),
> as you can do anything in ooRexx DYNAMICALLY (which you can't do in
> current NetRexx, by the way :-()
>
> And yes, friends, and enemies,
>
> I'm again CROSS-Posting this to ibm-netRexx, because my *opinion* is that
> Dynamicallity (or whatever is the correct english term) should be the
> *next major step* in NetRexx!!! :-)
>
> Anyway, happy and prosperous 2012 for you all, at both groups!
>
> Massa Thomas.
> ==================================================================================
>
>
> Am 28.12.2011 18:53, schrieb Gil Barmwater:
>> Hi Jon,
>>
>> I spent quite a bit of time playing with packages and discovered, via
>> trial and error, some things that weren't obvious.
>>
>> In RGF_Util2, Rony does .context~package in the "start-up" code and then
>> uses AddPublicRoutine to that package.  Apparently, those routines get
>> added to the RGF_Util2 package and then it gets "loaded" by the
>> "requiring" program so the added routines are available there too.  When
>> I tried to do something similar "later", by executing the same code as a
>> method of a public class in a "required" file, the added routine was NOT
>> visible to the main program.  I finally ended up passing the .context of
>> the main program to my method which got the package and added the
>> routine.  It makes sense after I worked it out but it took a while to
>> get there.
>>
>> HTH...
>>
>> Sahananda (Jon) Wolfers wrote:
>>> Hi Rony,
>>>
>>> thanks for your help.  I hope you dont mind me asking some stupid
>>> sounding questions, but I think that this will help me and others that
>>> come along later.
>>>
>>> In RGF_Util2, you have written some methods, and then you dynamically
>>> convert them to routines and add them to the package as public routines
>>> (neat), but
>>>
>>> 1) Why do this instead of creating them as routines with the public
>>> keyword in the first place.  Is there a difference?
>>>
>>> 2) Some script, lets call it BaseScript.Rex is going to require your
>>> library rgf_util2.rex.  During the execution of rgf_util2.rex you
>>> retrieve the package from the context and it's name is
>>> '...\rgfutil2.rex'.  When BaseScript.Rex executes the code within it, it
>>> could retrieve the package from the context and then the package name
>>> would be '...\BaseScrpt.Rex'.  Are they the same package or different?
>>>    If they are the same package, why does one not see the routines you
>>> added in the publicRoutines collection?
>>>
>>> that's probably enough for now.
>>>
>>> thanks,
>>>
>>> Jon
>>>
>>>
>>> On 27 December 2011 12:11, Rony G. Flatscher
>>> <[hidden email]<mailto:[hidden email]>>   wrote:
>>>
>>>       Hi Jon,
>>>
>>>
>>>       On 27.12.2011 07:35, Sahananda (Jon) Wolfers wrote:
>>>
>>>>       thanks for that.  It is good to have examples of interrogating the
>>>>       package class.
>>>       Also for using it to change the runtime environment of the package
>>>       the code gets executed, which is the case when adding public
>>>       routines and public classes to it!
>>>
>>>
>>>>       However, what I am currently interested in finding out is how you
>>>>       can use the package class to manage your environment, if indeed
>>>>       that is what it is intended for.
>>>       Yep, see example code below, e.g.
>>>
>>> ...
>>> .context~package~addPublicRoutine(idx, routine)
>>> ...
>>> .context~package~addPublicClass("StringOfWords", .StringOfWords)
>>> ...
>>>
>>>       After these statements each Rexx program that called or required
>>>       "rgf_util2.rex" will see the just added routines and classes.
>>>
>>>
>>>>       What particularly was on my mind is that I work with a couple of
>>>>       applications (not Rexx ones) that implement the concept which for
>>>>       want of a better term I will call code-layers.  So, for instance
>>>>       there may be a layer for the authors of the software, another for
>>>>       the reseller, another for the end-users' technical department, and
>>>>       another for the end-user.  If a script is called, then the layers
>>>>       are searched from the end-user's layer up towards the author's
>>>>       layer until a script of that name is found.  That is then the
>>>>       version of the script that is run.
>>>       Using the package in those layers you are thinking about should
>>>       allow you to do what you seek, you just need to adjust the direction
>>>       (bottom-up or top-to-bottom resolution).
>>>
>>>       HTH,
>>>
>>>       ---rony
>>>
>>>
>>>       _______________________________________________
>>>       rexxla-members mailing list -- mailto:[hidden email]
>>>       <mailto:[hidden email]>
>>>       http://rice.safedataisp.net/mailman/listinfo/rexxla-members
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> rexxla-members mailing list -- mailto:[hidden email]
>>> http://rice.safedataisp.net/mailman/listinfo/rexxla-members
>


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com