NSSelector<T> - a curiosity
NSSelector<T> - a curiosity
- Subject: NSSelector<T> - a curiosity
- From: Michael Scott <email@hidden>
- Date: Wed, 07 May 2008 10:12:32 +0800
- Thread-topic: NSSelector<T> - a curiosity
Title: NSSelector<T> - a curiosity
NSSelector has been generified (generifried?) so that the return type of the method it calls must be specified as a type parameter.
So,
NSSelector<String> selector = new NSSelector<String>(“testMethod”);
Can be used to call the following method which returns a String (regardless on what class the method resides):
public String testMethod() {
return “testing, testing, 1, 2, 3 ...”;
}
But what if the method returns void?
public void testMethod2() {
// do something fab
}
What type argument should be used to instantiate NSSelector<T>?
Or have I missed something fundamental?
Cheers
Michael Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden