com.webobjects.foundation.NSMutableArray.addObject("anString");

Ricardo Strausz <[email protected]> Mon, 1 Sep 2003 13:34:11 -0500
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <[email protected]>
I am getting crazy with this... please help.
It may be just as simple, but it looks like I am blind about it.

The scenario: I am inserting a new object in a DisplayGroup which takes 
its values from another one which alredy exists (in another 
DisplayGroup). I am using an NSDictionary as a "transport" object for 
the values. The code is below.

The error is: com.webobjects.foundation.NSMutableArray does not 
responds to addObject()
which is obviously not true!!!!

Am I doing something wrong?
or, do I have to blame the Bridge??

- (IBAction)add:(id)sender
{
     EODisplayGroup* dgDetallesP; //  asume this exists (it lives in the 
nib)
     EODisplayGroup* dgDetallesF; //  asume this exists (it lives in the 
nib)
     NSArray* source = [dgDetallesP selectedObjects];
     NSEnumerator* enSource = [source objectEnumerator];
     EOGenericRecord* eo = nil;

     while([enSource hasMoreElements]){
         eo = [enSource nextElement];

         NSMutableArray* keys = 
[NSClassFromString(@"com.webobjects.foundation.NSMutableArray") new];
         [keys addObject:@"cantidad"];
         [keys addObject:@"descripcion"];
         NSDictionary* nsd = [eo valuesForKeys:keys];

         [dgDetallesF insert:self];
         EOGenericRecord* neo = [dgDetallesF selectedObject];
         [neo takeValuesFromDictionary:nsd];
     }
}


Dino
http://homepage.mac.com/strausz