• 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
Re: java object definition question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java object definition question


  • Subject: Re: java object definition question
  • From: email@hidden
  • Date: Tue, 2 Sep 2008 02:56:17 -0700 (PDT)

Thanks, after reading through the pdf, I realized my error (oh, if life were only that simple)...

NSMutableArray<Integer> args = new NSMutableArray<Integer>();
args.addObject(theSelectedManufacturer.id());

is what I was looking for...

Thanks again.

Ted


--- On Tue, 9/2/08, Ramsey Gurley <email@hidden> wrote:

> From: Ramsey Gurley <email@hidden>
> Subject: Re: java object definition question
> To: email@hidden
> Cc: email@hidden
> Date: Tuesday, September 2, 2008, 1:26 AM
> On Sep 2, 2008, at 12:45 AM, email@hidden wrote:
>
> > This is actually a java question, I hope it is not too
> basic a
> > question...
> >
> > NSMutableArray args = new NSMutableArray();
> > args.addObject(theSelectedManufacturer.id());
> > EOQualifier qual =
> >
> EOQualifier.qualifierWithQualifierFormat("manufacturerID
> = %d", args);
> > fetchResult =
> Asset.fetchAssets(ERXEC.newEditingContext(), qual,
> > null);
> >
> >
> > When creating an NSMutableArray like this Eclipse is
> complaining
> > that it is a 'Raw' type and should be
> parameterized. So I read as
> > much as I could and found that
> "NSMutableArray<?>" works to remove
> > the error from the first element but not for the
> second ie
> >
> > NSMutableArray<?> args = new NSMutableArray();
> > args.addObject(theSelectedManufacturer.id());
> >
> > but like this addObject complains that it is not
> applicable for the
> > arguments.
> >
> > I guess the question is, what is the correct method to
> create the
> > new mutable array and then populate it. The first
> example above
> > works. It's just that I get the errors (I could
> suppress the
> > errors). I want to learn how to do it better.
> >
> > Ted
>
> There's a great video on using generics here
>
> http://www.youtube.com/watch?v=pi_I7oD_uGI
>
> and a reference from Sun on how to use them here
>
> http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
>
> Ramsey



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: java object definition question (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: Automatic data generation
  • Next by Date: Re: Multiple File Upload
  • Previous by thread: Re: java object definition question
  • Next by thread: stupid question of the day: wonder checkout on case insensitive filesystems (MacOSX)
  • Index(es):
    • Date
    • Thread