Question for the Java Gurus
Question for the Java Gurus
- Subject: Question for the Java Gurus
- From: Owen McKerrow <email@hidden>
- Date: Thu, 22 Apr 2004 13:48:53 +1000
Hi All,
How can I make the following code work if entity is an instance of
String passed in as an argument to the function. i.e. Can I cast to a
specific Class if all I have is the name of the Class as a String ? If
not is there another way I can do this ?
public getOtherObjects(String entity, NSArray objects) {
for(int i=0;i<objects.count();i++) {
Object tempOb = (entity)array.objectAtIndex(0);
}
}
Thanks
Owen McKerrow
"As of tomorrow, employees will only be able to access the building
using individual security cards. Pictures will be taken next Wednesday
employees will receive their cards in two weeks."
- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp
_______________________________________________
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.