• 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
Question for the Java Gurus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.



  • Follow-Ups:
    • Re: Question for the Java Gurus
      • From: Jake MacMullin <email@hidden>
    • Re: Question for the Java Gurus
      • From: Art Isbell <email@hidden>
  • Prev by Date: Re: Apppend to WOHyperlink Invoking Action
  • Next by Date: Re: WO and Java 'packages'?
  • Previous by thread: Re: Apppend to WOHyperlink Invoking Action
  • Next by thread: Re: Question for the Java Gurus
  • Index(es):
    • Date
    • Thread