Re: Casting Object to NSArray
Re: Casting Object to NSArray
- Subject: Re: Casting Object to NSArray
- From: Art Isbell <email@hidden>
- Date: Fri, 27 Jun 2003 10:33:05 -1000
On Friday, June 27, 2003, at 09:40 AM, 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.
If the object returned from this method is actually an NSArray, merely
casting it to NSArray is all that's necessary. If doing so is failing,
then are you certain that the returned object is an NSArray? You can
find out the returned object's type:
object.getClass().getName() will return the class name.
NSArray.class.isInstance(object) will return true if object is an
NSArray.
Aloha,
Art
_______________________________________________
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.