• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[partially solved]: com.webobjects.foundation.NSMutableArray.addObject("anString");
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[partially solved]: com.webobjects.foundation.NSMutableArray.addObject("anString");


  • Subject: [partially solved]: com.webobjects.foundation.NSMutableArray.addObject("anString");
  • From: Strausz Riccardo <email@hidden>
  • Date: Wed, 3 Sep 2003 04:14:57 -0500

Well, a dirty solution again...
problem:
it seem that the probles is with the bridge; since I am calling the
keys.addObject("aKey"); from ObjC (with [keys addObject:@"aKey"];), the
bridge is serching for a method with signature
com.webobjects.foundation.NSMutableArray.addObject(String aString);
which does not exists.
sol.:
implement a Util.java which does the job in the Java side... quite
dirty!!!
I am trying to cast my strings to id (Object) to fool the bridge, but
have not yes a clean solution...
If some one else finds a better solution, please let me know.
Dino

On lunes, sept 1, 2003, at 13:34 America/Mexico_City, Ricardo Strausz
wrote:

> 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
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [partially solved]: com.webobjects.foundation.NSMutableArray.addObject("anString");
      • From: Art Isbell <email@hidden>
References: 
 >com.webobjects.foundation.NSMutableArray.addObject("anString"); (From: Ricardo Strausz <email@hidden>)

  • Prev by Date: Re: Database Connection Errors
  • Next by Date: Re: Database Connection Errors
  • Previous by thread: com.webobjects.foundation.NSMutableArray.addObject("anString");
  • Next by thread: Re: [partially solved]: com.webobjects.foundation.NSMutableArray.addObject("anString");
  • Index(es):
    • Date
    • Thread