I'm unable to reproduce this problem, but as you see below, that could be caused by something as simple as executing this from a different length directory name.  I've checked in a fix which I think should fix this for you...you're probably going to have to verify it. 

On 10/31/07, Mark Miesfeld <miesfeld@gmail.com> wrote:

With rev 1170 there were 2 test unit failures that were not present before.

This test:

::method "test_MIXINCLASS_01"
   cl=.object~mixinclass("subTest_01", not_an_existing_class)

fails because the syntax error produced was

Event: [SYNTAX 97.1] raised unexpectedly.
  Object "NOT_AN_EXISTING_CLASS" does not understand message "NEW"

btw, I don't remember if I mentioned this before, but an extremely handy breakpoint is RexxActivity::raiseException().  That's the place where all Rexx error messages go through, so you can look back through the stack to see where the error is coming from. 

This simple one line program produces the right error:

  myMixIn = .object~mixinclass("myClass", bogus_metaclass)

Error 99.927:  "BOGUS_METACLASS" is not a valid metaclass

But, when I look at it in the debugger I see that here in ClassClass.cpp

  if (!meta_class->queryMeta())        /* check that it is a meta class     */
    reportException(Error_Translation_bad_metaclass, meta_class);

the class_info field is in one case 1795875088 and in the other case
is 1162494633.

So, it is just pure happenstance that, when &'d with 0x10, one of the
cases is 0 and one of the case is not.

Yep, pure happenstance.  This should be testing that this is a valid class object first.  Fortunately, we have a shiny new isInstance() method in the code now for that sort of test.

My weak C++ shows here.  The object that is suppossed to be a meta
class is of course actually a string class.  Should it even have a
class_info field?

When dealing with C++ object pointers and non-virtual methods, if you tell the compiler it's pointing at a RexxClass object, it just overlays the structure over the storage, and picks the value at the appropriate offset.  If you're not dealing with virtual methods, a class and a struct can be used almost interchangeably.  If I do my math right, the class info field it's looking at would actually be in the object following the string object! 

So, I don't know if the field should be set to 0, but is missed, or if
you need to first chect that meta_class *is* a meta class before you
invoke queryMeta() on the object.

Gotta run, I'm sure you know the answer.  <grin>

Mark Miesfeld

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Oorexx-devel mailing list