login about faq

I am Bridging the Objective-C Library to Swift. Works fine, but I cannot Override the BeginDownloadFile Method, because of type missmatch with the second Parameter. Does anybody know, what will be the right declaration in Swift? I tries all types I know, including UnsafeMutablePoint and UnsafePointer combinations. Help would be great !!!!! Below the code, which works, but not the BeginDownloadFile Method. This gives an error of overriding incompatible declaration.

Best, Stefan

class SyncProgress : CkoFtp2Progress {

 override func BeginDownloadFile( path: NSString, skip: CLong) {
    println ("BeginDownloadFile: \(path)")
}

override func EndDownloadFile( path: String,  numBytes: NSNumber) {
    println ("EndDownloadFile: \(path)")
}

override func DownloadRate(var byteCount: NSNumber, var bytesPerSec: NSNumber) {
    println ("DownloadRate: \(byteCount)")
}

}

asked Nov 05 '14 at 16:29

mazApp's gravatar image

mazApp
1123


I use the old style Objective-C Implementation just for the CkoFtp2Progress and the rest in Swift. This works now perfect for me.

link

answered Nov 16 '14 at 07:27

mazApp's gravatar image

mazApp
1123

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×94
×1

Asked: Nov 05 '14 at 16:29

Seen: 1,085 times

Last updated: Nov 16 '14 at 07:27

powered by OSQA