Re: get class of a method's returned object

2015-02-24 Thread BareFeetWare
Hi Kyle, Yes, I am running this on iOS. Sorry, I didn't make that clear. Yes, you are quite right. _shortMethodDescription only shows (id) as the return class, so even this private method doesn't help me. I shall now abandon all hope  Thank you for your attempts. Much appreciated. Thanks,

Re: Latest Documentation for adding Applescript Support to an Objective-C Project

2015-02-24 Thread Dave
On 23 Feb 2015, at 23:29, Shane Stanley sstan...@myriad-com.com.au wrote: On 24 Feb 2015, at 12:21 am, Dave d...@looktowindward.com wrote: From searching online it looks like things have changed quite recently? Not in terms of how it's implemented in apps. I’m wondering why I got a

What's wrong with this code, why is the label invisible?

2015-02-24 Thread Aaron Lewis
Can someone please take a look at this? http://stackoverflow.com/questions/28690947/why-is-this-uiimage-and-uilabel-collapsed In short words, the UILabel is invisible when I use a image in the UIImageView. It works if I only set backgroundColor. I already add a constraint on it .. I couldn't

Re: What's wrong with this code, why is the label invisible?

2015-02-24 Thread Roland King
On 24 Feb 2015, at 16:44, Aaron Lewis the.warl0ck.1...@gmail.com wrote: Can someone please take a look at this? http://stackoverflow.com/questions/28690947/why-is-this-uiimage-and-uilabel-collapsed In short words, the UILabel is invisible when I use a image in the UIImageView. It

Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:

2015-02-24 Thread Steve Mills
I've been trying tons of different things, but can't make this work. I'm running an NSOpenPanel with beginSheetModalForWindow:completionHandler: to choose a destination folder. In the completionHandler I'm processing 1 or more files by copying them to the chosen folder. When an error appears

[RESOLVED] Re: What's wrong with this code, why is the label invisible?

2015-02-24 Thread Aaron Lewis
Thanks Roland. I never know about the contentView and intrinsicContentSize property, learned something new today. You enlightened me a lot. So I tried to use interface editor before but got the same result. Now I see why. I didn't set a minimal height for the label:

Re: Latest Documentation for adding Applescript Support to an Objective-C Project

2015-02-24 Thread Shane Stanley
On 24 Feb 2015, at 8:40 pm, Dave d...@looktowindward.com wrote: I’m wondering why I got a warning when I downloaded the sample Apps then? Sounds odd. I just downloaded a couple again, with no problems other than build settings that needed to be updated. -- Shane Stanley

Re: Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:

2015-02-24 Thread Ken Thomases
On Feb 24, 2015, at 3:09 AM, Steve Mills sjmi...@mac.com wrote: I've been trying tons of different things, but can't make this work. I'm running an NSOpenPanel with beginSheetModalForWindow:completionHandler: to choose a destination folder. In the completionHandler I'm processing 1 or more

Convert CGFloat to NSNumber

2015-02-24 Thread Charles Jenkins
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

Re: [RESOLVED] What's wrong with this code, why is the label invisible?

2015-02-24 Thread Roland King
On 24 Feb 2015, at 20:06, Aaron Lewis the.warl0ck.1...@gmail.com wrote: Thanks Roland. No problem. I never know about the contentView and intrinsicContentSize property, learned something new today. You enlightened me a lot. So I tried to use interface editor before but got the same

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Roland King
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

Re: How to translate this form objc to swift? (__unsafe_unretained)

2015-02-24 Thread Jonathan Hull
Off the top of my head (written in mail): for (key,value) in headers { request.setValue(value, forHTTPHeaderField: key) } Thanks, Jon On Feb 23, 2015, at 6:55 AM, Juanjo Conti jjco...@carouselapps.com wrote: NSUInteger count = [headers count]; __unsafe_unretained id

Re: [RESOLVED] What's wrong with this code, why is the label invisible?

2015-02-24 Thread dangerwillrobinsondanger
One should add that you could make the value of a metric a calculation of what's left after other elements are determined. It's a fairly advanced approach that can be tricky. But, it's one way to compensate for font and font size variation. I would highly recommend Erica Sadun's book on

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Charles Jenkins
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

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Roland King
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!

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Marco S Hyman
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

Re: Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:

2015-02-24 Thread Steve Mills
On Feb 24, 2015, at 11:18:04, Kyle Sluder k...@ksluder.com wrote: This sounds like the kind of thing -[NSDocument performActivityWithSynchronousWaiting:usingBlock:] was designed for, though it's a rather tricky API. Here's my stab at it: Interesting stuff, and highly confusing. :) -

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Kyle Sluder
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

Re: Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:

2015-02-24 Thread Kyle Sluder
On Tue, Feb 24, 2015, at 03:09 AM, Steve Mills wrote: Just doing it that way puts up lots of overlapping alert sheets without waiting for the user to respond. While that certainly would keep the user on their toes, it's not at all right. I've tried using a semaphore to wait for the alert

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Quincey Morris
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

Handle js cookies in WebView

2015-02-24 Thread Juanjo Conti
Hi there! I'm still trying to have private cookie jars at Max Os X for my app: http://stackoverflow.com/questions/28456789/separate-cookie-jar-per-webview-in-os-x At this point, I have translated from objc to swift the BSHTTPCookieStorage class mentioned in the SO question (to get a better