• 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: Init in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Init in Swift


  • Subject: Re: Init in Swift
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 06 Sep 2016 21:28:23 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sNOOIIdVds:SMTPCORP

On Sep 6, 2016, at 21:14 , Gerriet M. Denkmann <email@hidden> wrote:
>
> But I cannot get this to work.

Meaning … ?? A compiler error? What does the source code look like, of the protocol with the class func in it? What is the error message?

> NewSuper uses this classFunction like:
> func otherFunction( arg: UInt64) -> UInt64
> {
> 	return self.dynamicType.classFunction(  arg ) + 21
> }

If this is how you’re using it, it’d be clearer for the method you’re currently calling “classFunction” to be an instance method called something like “utilityFunction”. The only real reason it would *have* to be a class function would be if you’re calling it in a context where there is no instance — and the above is not that.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Init in Swift
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Init in Swift (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Init in Swift (From: Quincey Morris <email@hidden>)
 >Re: Init in Swift (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Init in Swift (From: Quincey Morris <email@hidden>)
 >Re: Init in Swift (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Init in Swift
  • Next by Date: Re: Init in Swift
  • Previous by thread: Re: Init in Swift
  • Next by thread: Re: Init in Swift
  • Index(es):
    • Date
    • Thread