• 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
Re: <T> in NSSelector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <T> in NSSelector


  • Subject: Re: <T> in NSSelector
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Tue, 02 Jun 2009 12:02:14 -0400

Thanks Faizel.  That gets rid of the compiler warning.  And I'm thinking it makes sense to be the return type so that when the invoke gets called the compiler knows what to expect.

Ricardo


On Jun 2, 2009, at 11:57 AM, Faizel Dakri wrote:


On Jun 2, 2009, at 10:39 AM, Ricardo J. Parada wrote:

What is the <T> represent in the NSSelector constructor?

For example, if I do this in WO 5.4.3 I get a warning but I'm not sure what the <T> is supposed to be?  Is it supposed to be the return type for the method?

            NSSelector selector = new NSSelector("sessionDidExpire", new Class[] { NSNotification.class });

As far as I know, yes, it's the return type of the method for which you're creating the selector. So, assuming your method returned void, I think you can do something like:

NSSelector<Void> selector = new NSSelector<Void>("sessionDidExpire", new Class[] { NSNotification.class });

Fez

-- 
Faizel Dakri
email@hidden




 _______________________________________________
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

References: 
 ><T> in NSSelector (From: "Ricardo J. Parada" <email@hidden>)
 >Re: <T> in NSSelector (From: Faizel Dakri <email@hidden>)

  • Prev by Date: Re: <T> in NSSelector
  • Next by Date: Re: Results from the 2008 surveys
  • Previous by thread: Re: <T> in NSSelector
  • Next by thread: Changed porject name, but when runing ant it generate the war file with the old project name
  • Index(es):
    • Date
    • Thread