On Tue, Feb 12, 2013 at 3:11 PM, Rick McGuire <object.rexx@gmail.com> wrote:


Change your test to this

a=.array~new
a~append("::routine speak public")
a~append("say 'hi this is me'")
a~append("say 'bye'")
a~append("return 0")
p=.package~new("package1",a)
r = speak()

and try it.

Although I just did and it didn't work as I expected.  But, it is more like what I think should work.


Mark, speak() did not work because creating the package does not automatically add the package to the current context.  You'd need to add  

  .context~package~addPackage(p) 

to add it to the namespace. 



Thanks, that makes sense.  I was just trying to use loadPackage( 'package1').  Which doesn't work either because the arg is a file name, not the name given in new().

--
Makr Miesfeld