Re: Casting Object to NSArray
Re: Casting Object to NSArray
- Subject: Re: Casting Object to NSArray
- From: Ricardo Strausz <email@hidden>
- Date: Fri, 27 Jun 2003 15:53:05 -0500
I'm not sure I understud...
do you want to cast? if so:
(NSArray)object.method(); // in Java
(NSArray *)[object method]; // in ObjC
do you nead a new array?:
NSArray.arrayWithArray((NSArray)object,method()); // or
[NSArray arrayWithArray:[object method]];
Observe that, in the second case, you donot nead to cast (in ObjC)...
the runtime will take care, but you may nead to "catch" the possible
exception.
Is this what you meant?
On viernes, juni 27, 2003, at 14:40 America/Mexico_City, 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.
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.