• 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
Nested NSArray of Strings - Generics - WO5.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nested NSArray of Strings - Generics - WO5.4


  • Subject: Nested NSArray of Strings - Generics - WO5.4
  • From: Gaastra Dennis - WO Lists <email@hidden>
  • Date: Wed, 21 Nov 2007 22:17:12 -0800

Dear List, 

We like to create a nested array the following way:

    NSArray<String> row1 = new NSArray<String>(new String[] {"Jim","Pattison"});
    NSArray<String> row2 = new NSArray<String>(new String[] {"Tony","Lo"});
    NSArray<String> row2 = new NSArray<String>(new String[] {"Keezo","Shimano"});
    NSArray<NSArray<String>> rows = new NSArray<NSArray<String>>(new NSArray[]{row1,row2,row3});

yielding compiler warning for the 4th line:

... warning: [unchecked] unchecked conversion
found   : com.webobjects.foundation.NSArray[]
required: com.webobjects.foundation.NSArray<java.lang.String>[]
    NSArray<NSArray<String>> rows = new NSArray<NSArray<String>>(new NSArray[]{row1,row2,row3});

How to fix this by keeping the code structure almost the same - without having to use arrayByAddingObject or (Mut) addObject?
.. and no suppression of warnings...
We tried changing NSArray[] to NSArray<String>[], but without success.

With Kind Regards,

Dennis Gaastra, M.B.A.[sfu.ca], B.Sc.[ubc.ca]
Chief Technology Officer,


 _______________________________________________
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

  • Follow-Ups:
    • Re: Nested NSArray of Strings - Generics - WO5.4
      • From: Q <email@hidden>
    • Re: Nested NSArray of Strings - Generics - WO5.4
      • From: "Daniele Corti" <email@hidden>
  • Prev by Date: WOLips Howto? have a plist file copy to build when it's changed...
  • Next by Date: Re: Leopard, Eclipse/WOLips: xerces issue
  • Previous by thread: Re: WOLips Howto? have a plist file copy to build when it's changed...
  • Next by thread: Re: Nested NSArray of Strings - Generics - WO5.4
  • Index(es):
    • Date
    • Thread