Re: [swift-users] SPM: Subfolders in a Module

2016-09-15 Thread Ankit Agarwal via swift-users
On Fri, Sep 16, 2016 at 12:21 AM, Toni Suter via swift-users < swift-users@swift.org> wrote: > Hi everyone, > > Let's assume there's a Swift package with the following Layout: > > MyPackage/ > ├── Package.swift > └── Sources > └── MyModule > ├── SubFolder > │ └── MyClass.swif

Re: [swift-users] Creating a NSAttributedString from HTML

2016-09-15 Thread Félix Cloutier via swift-users
How did you identify the methods? The source location shows as :0 here. Félix > Le 15 sept. 2016 à 09:05:06, Erica Sadun a écrit : > >> On Sep 14, 2016, at 9:43 AM, Félix Cloutier via swift-users >> mailto:swift-users@swift.org>> wrote: >> >> I'm trying to create a NSAttributedString from its

[swift-users] How to create an uninitialized pointer in Swift 3

2016-09-15 Thread Lane Schwartz via swift-users
In Swift 2.2, I could do the following: var cublasHandle : COpaquePointer = nil let status = cublasCreate_v2(&cublasHandle) Where cublasCreate_v2 is a C function that takes a pointer, and then initializes some memory at that address. I haven't been able to figure out an equivalent in Swift 3. An

[swift-users] Problem calling a C function passing a void** from Swift 3

2016-09-15 Thread Lane Schwartz via swift-users
Hi, I just moved to Xcode 8 (actually, it upgraded itself without me realizing it, but anyway), and some previously working Swift 2.2 code now doesn't work. I'm having trouble migrating. The code in question is supposed to declare, but not allocate, a block of memory. A void** to that block of me

[swift-users] Problem calling a C function passing a void** from Swift 3

2016-09-15 Thread Lane Schwartz via swift-users
Hi, I just moved to Xcode 8 (actually, it upgraded itself without me realizing it, but anyway), and some previously working Swift 2.2 code now doesn't work. I'm having trouble migrating. The code in question is supposed to declare, but not allocate, a block of memory. A void** to that block of me

[swift-users] Vague error description when trying to match an instance in a switch statement

2016-09-15 Thread hello--- via swift-users
The following code struct A {} let x = A() let y = A() switch x { case y: break default: break } produces "error: expression pattern of type 'A' cannot match values of type 'A'". This is kind of a vague description of what is really going on, the compiler actually exp

[swift-users] SPM: Subfolders in a Module

2016-09-15 Thread Toni Suter via swift-users
Hi everyone, Let's assume there's a Swift package with the following Layout: MyPackage/ ├── Package.swift └── Sources └── MyModule ├── SubFolder │ └── MyClass.swift └── main.swift As far as I can tell, there's still just one module called MyModule and the subfolder

Re: [swift-users] Creating a NSAttributedString from HTML

2016-09-15 Thread Erica Sadun via swift-users
> On Sep 14, 2016, at 9:43 AM, Félix Cloutier via swift-users > wrote: > > I'm trying to create a NSAttributedString from its HTML representation in > Swift 3 (from the Xcode 8 GM build). However, this doesn't work: > >> import Foundation >> import AppKit >> >> let html = "hello world" >> let

[swift-users] Creating a NSAttributedString from HTML

2016-09-15 Thread Félix Cloutier via swift-users
I'm trying to create a NSAttributedString from its HTML representation in Swift 3 (from the Xcode 8 GM build). However, this doesn't work: > import Foundation > import AppKit > > let html = "hello world" > let data = html.data(using: .utf8, allowLossyConversion: true)! > let attributed = NSAttri