error: value of type 'NSMutableData' has no member 'rangeOfData'


(Rajat Talwar) #1

Hello devs,

I am new to swift on linux, am facing compilation issue on this code saying 'NSMutableData' has no member ‘rangeOfData'

import Foundation

let buffer = NSMutableData(capacity: 200)
let delim:NSString = "\n"

buffer!.rangeOfData(delim.dataUsingEncoding(NSUTF8StringEncoding)!, options: [], range: NSMakeRange(0, buffer!.length))

I am using swift-2.2-SNAPSHOT-2016-01-11-a-ubuntu15.10

Any help or info is highly appreciated.


(Philippe Hausler) #2

Looks like we have some more missing method placeholders. That is just a bug in the regards that we forgot to add the NSUnimplemented stub for that. So i guess it is up for grabs for someone to implement.

···

On Jan 14, 2016, at 8:32 PM, Rajat Talwar via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hello devs,

I am new to swift on linux, am facing compilation issue on this code saying 'NSMutableData' has no member ‘rangeOfData'

import Foundation

let buffer = NSMutableData(capacity: 200)
let delim:NSString = "\n"

buffer!.rangeOfData(delim.dataUsingEncoding(NSUTF8StringEncoding)!, options: [], range: NSMakeRange(0, buffer!.length))

I am using swift-2.2-SNAPSHOT-2016-01-11-a-ubuntu15.10

Any help or info is highly appreciated.

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev