• 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: Casting Object to NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Casting Object to NSArray


  • Subject: Re: Casting Object to NSArray
  • From: Alan Ward <email@hidden>
  • Date: Fri, 27 Jun 2003 13:17:30 -0700

NSArray array = (NSArray) theMethodYouAreCalling();

you might want to wrap it in a try block that catches ClassCastException if
it's possible that it will return something other than an NSArray.


Alan


On Friday, June 27, 2003, at 12:40 PM, Goodbye Bill wrote:

There is a method (not mine) that I am calling from my code which passes
back an "Object" and does this for EVERYTHING it returns (only one public
method). The "Object" that I am trying to receive from it is actually an
"NSArray" however I cannot figure out the syntax to get the generic "Object"
object back to an "NSArray" object.


Any ideas?
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Casting Object to NSArray (From: Goodbye Bill <email@hidden>)

  • Prev by Date: Re: Flatten Relationships
  • Next by Date: Re: Casting Object to NSArray
  • Previous by thread: Casting Object to NSArray
  • Next by thread: Re: Casting Object to NSArray
  • Index(es):
    • Date
    • Thread