Re: [swift-users] NSFontManager's availableMembers(ofFontFamily: String) broken?

2016-10-07 Thread Jens Persson via swift-users
Found this: http://stackoverflow.com/questions/39395237/why-is-nsfontmanager-availablemembersoffontfamily-crashing-in-xcode-8-gm On Sat, Oct 8, 2016 at 8:37 AM, Jens Persson wrote: > It crashes runtime except when the given string is not an existing font > family name, in which case it returns

[swift-users] NSFontManager's availableMembers(ofFontFamily: String) broken?

2016-10-07 Thread Jens Persson via swift-users
It crashes runtime except when the given string is not an existing font family name, in which case it returns nil (as expected). So I'm unable to use it. Here's a REPL session demo of the issue, but it's the same in Xcode 8 and 8.1 beta 1 (haven't tried any other versions): Welcome to Apple Swif

Re: [swift-users] C interop: passing null pointers to unwrapped unsafe pointers

2016-10-07 Thread Joe Groff via swift-users
> On Oct 7, 2016, at 7:02 AM, Ingo Maier via swift-users > wrote: > > Is there a way in Swift 3 to pass a null pointer to a C function that > takes an implicitly unwrapped unsafe pointer? I understand that > pointer parameters in C that don't specify nullability are mapped to > implicitly unwra

[swift-users] Struct, Mutating and Property Observers

2016-10-07 Thread Седых Александр via swift-users
Please look at that code: class Mut { var zetstruct = MutStr(z: 5) { didSet { print("struct was change") zetstruct.addZet(num: 10) } } struct MutStr { var z: Int mutating func addZet(num: Int) { z += num

[swift-users] C interop: passing null pointers to unwrapped unsafe pointers

2016-10-07 Thread Ingo Maier via swift-users
Is there a way in Swift 3 to pass a null pointer to a C function that takes an implicitly unwrapped unsafe pointer? I understand that pointer parameters in C that don't specify nullability are mapped to implicitly unwrapped pointers in Swift 3. Since it's not uncommon for existing unannotated C API

Re: [swift-users] DispatchQueue extension

2016-10-07 Thread Quinn "The Eskimo!" via swift-users
On 6 Oct 2016, at 20:20, Nick Brook via swift-users wrote: > I have an extension on DispatchQueue and I have Objective-C code which uses > my swift code, so the DispatchQueue extension is exported to the Swift > objective-c header as > > @interface OS_dispatch_queue > > However, Xcode 8.0 a