I’m surprised how painful it is to do trivial things in Swift. All I want to do
is convert NSFont.pointSize to an NSNumber, but I can’t figure out any syntax
the Swift compiler will accept.
My latest fruitless attempt has involved trying to simply cast the value into
something for which
On 24 Feb 2015, at 18:57, Charles Jenkins cejw...@gmail.com wrote:
I’m surprised how painful it is to do trivial things in Swift.
I’ve stopped being surprised at this.
Between the anal type checking and the spew of optionals I spend all my time
fiddling around trying to get a ‘?’ in the
A structure?!? I did look it up in the documentation, and all I found was “the
basic type for all floating-point values.” That the basis of all floating-point
types could be a structure never occurred to me. Thanks!
Swift is a language I want to like, but currently it makes the easy stuff hard
On 25 Feb 2015, at 00:14, Charles Jenkins cejw...@gmail.com wrote:
A structure?!? I did look it up in the documentation, and all I found was
“the basic type for all floating-point values.” That the basis of all
floating-point types could be a structure never occurred to me. Thanks!
On Feb 24, 2015, at 10:16 AM, Quincey Morris
quinceymor...@rivergatesoftware.com wrote:
The following work, too (Xcode 6.1.1):
let f1: NSNumber = font.pointSize
let f2 = font.pointSize as NSNumber
...
(Things may have changed in Swift 1.2, though.)
Works fine in
On Tue, Feb 24, 2015, at 04:57 AM, Charles Jenkins wrote:
My latest fruitless attempt has involved trying to simply cast the value
into something for which NSNumber has a corresponding init():
let size:Float = font.pointSize as Float
let points = NSNumber( float: size )
You need to
On Feb 24, 2015, at 08:14 , Charles Jenkins cejw...@gmail.com wrote:
A structure?!? I did look it up in the documentation, and all I found was
“the basic type for all floating-point values.” That the basis of all
floating-point types could be a structure never occurred to me.
That’s not