Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Roland King
> On 15 Jun 2015, at 05:56, Quincey Morris > wrote: > > On Jun 13, 2015, at 19:50 , Rick Mann wrote: >> >> Watch the talk on protocol-oriented programming >> (https://developer.apple.com/videos/wwdc/2015/?id=408 >> ). > > You liked that

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 00:34 , Roland King wrote: > > I think Protocol Extensions are the power feature to Swift this year Yes, though I’ve been trying to convert a fair-sized app, and I ran into a conceptual difficulty when a protocol has a Self constraint. In essence, a Self constraint prevents

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Kevin Meaney
> The other major problem I ran into — unrelated, but I’m mentioning it in case > someone wants to jump in and tell me the easy way — is that I’m trying to use > frameworks in order to break the project into modules so that I can use the > access controls (private and internal) to keep implemen

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Roland King
>> And now I know what Kyle looks like too! > > What’s the video? > What’s New In Interface Builder. (The answer to that question appears to be some useful things to make your life easier but not so much you have to learn it all over again this year - so that’s good) _

Re: Goodbye and Thanks for All The Code

2015-06-16 Thread Michael David Crawford
I wrote: > while the legal > rights of the mentally ill are well-established in legislation as well > as court precedent, those rights are not only not enforced, they are > largely unknown. One way I determine whether psychiatric hospital staff are aware of the rights on mental inpatients is by f

Re: Most People Still Use Dialup

2015-06-16 Thread Maxthon Chan
From where I live despite we have fiber broadband connection but in practice it is slow like hell when connecting to anything that is not on the same carrier, and 4G traffic is extremely expensive (US$10 for 1GB of traffic.) Since I don’t write games, I try my best to make apps as tiny as possib

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Maxthon Chan
You actually can build the OS X and iOS versions of the same framework with the same name, just keep the targets in separate projects and double-check when linking. > On Jun 16, 2015, at 16:36, Kevin Meaney wrote: > > >> The other major problem I ran into — unrelated, but I’m mentioning it in

Re: Most People Still Use Dialup

2015-06-16 Thread Michael David Crawford
I was finally able to download that 1 GB printer driver assortment, but only by wandering around trying different wifi spots. I knew that I could have downloaded just a 24 MB driver for my specific printer but that would have come at the cost of bringing that printer with me to a wifi spot so OS X

Re: Most People Still Use Dialup

2015-06-16 Thread Michael David Crawford
Northern China has to talk to Southern China via Japan. This because some party official gave his son the gift of what at one time was the northern part of the state telecommunications monopoly. On 6/16/15, Michael David Crawford wrote: > I was finally able to download that 1 GB printer driver a

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Dave
> There are old-school reasons and new-school reasons. > > One of the biggest old-school reason is source duplication. You have to write > everything “twice”, once in @interface, once in @implementation. This has > been mitigated somewhat over the years, but Obj-C is literally twice the > numbe

Re: Most People Still Use Dialup

2015-06-16 Thread Alex Zavatone
On Jun 16, 2015, at 6:34 AM, Michael David Crawford wrote: > I was finally able to download that 1 GB printer driver assortment, > but only by wandering around trying different wifi spots. > > I knew that I could have downloaded just a 24 MB driver for my > specific printer but that would have c

Re: Most People Still Use Dialup

2015-06-16 Thread Michael David Crawford
What that page actually says to do, is to connect your printer then let OS X choose the driver for you. The driver I need is not available for manual selection. I didn't really want to have to connect a printer to download the driver, because it would look quite strange, if not downright offensiv

Re: [Swift] best way to support 'keyword' args, symbolic values, show values as literals?

2015-06-16 Thread has
On 15/06/2015 18:39, Quincey Morris wrote: On Jun 15, 2015, at 10:17 , has > wrote: the goal is to enable a user to print an object specifier and be able to copy-and-paste that straight into another script - i.e. `-description` should always return a string tha

Re: [Swift] best way to support 'keyword' args, symbolic values, show values as literals?

2015-06-16 Thread Dave
> Thanks to Apple actioning Radar tickets 19169736 > , 19169791 > , and 18944184 > , there are now modern, fully > supported NSAppleEventDescriptor APIs arriving in 10.11 that w

Prevent App Nap checkbox and Get Info

2015-06-16 Thread Michael Domino
Hi all, I don’t know if this is the correct forum for this question, but please direct me elsewhere if it’s not. I’ve noticed that some applications on my 10.10.3 system do not include the “Prevent App Nap” checkbox, and some do. My own application does not, but I don’t know for sure what I di

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 01:36 , Kevin Meaney wrote: > > #if os(iOS) Ah, thanks for reminding me about that. I keep forgetting that Swift has a form of #if. On Jun 16, 2015, at 03:22 , Maxthon Chan wrote: > > You actually can build the OS X and iOS versions of the same framework with > the same

Re: NSWindow child window and key status

2015-06-16 Thread Ben
Thank you for the suggestion, unfortunately it does not fix the problem. I will probably end up using a tech support incident for this one. - Ben > On 15 Jun 2015, at 23:50, Quincey Morris > wrote: > > On Jun 15, 2015, at 13:38 , Ben > wrote: >> >> I'

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Maxthon Chan
You don’t really need multiple repositories - two project files living in one workspace is okay. > On Jun 17, 2015, at 00:41, Quincey Morris > wrote: > > On Jun 16, 2015, at 01:36 , Kevin Meaney wrote: >> >> #if os(iOS) > > Ah, thanks for reminding me about that. I keep forgetting that Swift

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 10:06 , Maxthon Chan wrote: > > You don’t really need multiple repositories - two project files living in one > workspace is okay. Oh, yes, you’re right. That was another thing I’d forgotten — that there was still something left that [explicit] workspaces were good for!

Re: NSAppleEventDescriptor docs [was: Re: [Swift] best way to support 'keyword' args,...]

2015-06-16 Thread has
Dave wrote: >> Thanks to Apple actioning Radar tickets 19169736 , 19169791 , and 18944184 , there are now modern, fully supported NSAppleEventDescriptor APIs arriving in 10.11

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Kyle Sluder
On Tue, Jun 16, 2015, at 02:34 AM, Roland King wrote: > And now I know what Kyle looks like too! You know what I look like with a bad haircut and not a lot of sleep. :P BTW, the session is more precisely called What's New in Storyboards, in case anyone is having trouble finding it. --Kyle Slude

Weird infinite loop in _logos_method$VCModCore$__ABT$viewDidLoad

2015-06-16 Thread Doug Hill
I’m seeing a weird crash in our app coming from our App Store version. It goes into an infinite loop then crashes the app; see below. = 0 libobjc.A.dylib lookUpImpOrForward + 3 1 libobjc.A.dylib lookUpImpOrNil + 18 2 libob

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Maxthon Chan
I like the storyboard references, but where’d object references go? > On Jun 17, 2015, at 02:14, Kyle Sluder wrote: > > On Tue, Jun 16, 2015, at 02:34 AM, Roland King wrote: >> And now I know what Kyle looks like too! > > You know what I look like with a bad haircut and not a lot of sleep. :P

AppDelegate vs Custom View Controllers for Download Task...

2015-06-16 Thread Peters, Brandon
Hi, I have “duplicate” code for downloading a DB file in two custom view controllers that I think would be better served if the download were initiated when the App launches on the iPhone/iPad. My plan is to make the AppDelegate a delegate of NSURL session (and the various other NSURL delegate

Re: AppDelegate vs Custom View Controllers for Download Task...

2015-06-16 Thread Jens Alfke
> On Jun 16, 2015, at 3:37 PM, Peters, Brandon wrote: > > Is there any “known” danger in making the AppDelegate a NSURL session > delegate? No, but it doesn’t sound like a good design. The app delegate is for starting up the app and responding to some events from outside. It would be cleaner

Re: AppDelegate vs Custom View Controllers for Download Task...

2015-06-16 Thread Peters, Brandon
Jens, I will try that. I did find an example of what I described on GitHub, but again your solution sounds clean. Thanks. On Jun 16, 2015, at 6:43 PM, Jens Alfke mailto:j...@mooseyard.com>> wrote: On Jun 16, 2015, at 3:37 PM, Peters, Brandon mailto:bap...@my.fsu.edu>> wrote: Is there any “k

Re: AppDelegate vs Custom View Controllers for Download Task...

2015-06-16 Thread David Grant
Assuming it's only the one call for everything you'll need when the app starts it makes sense. Without knowing more detail it's hard to tell you that's the way you should go with it. Sent from my iPad > On Jun 16, 2015, at 3:37 PM, Peters, Brandon wrote: > > Hi, > > I have “duplicate” code

Re: [Swift] best way to support 'keyword' args, symbolic values, show values as literals?

2015-06-16 Thread Shane Stanley
On 17 Jun 2015, at 1:59 am, Dave wrote: > > I’m was about to add AppleScript Handling to my App and I’ll need to do a lot > of NSAppleEventDescriptor fishing, is there any advance documentation > relating to this? Look in the NSAppleEventDescriptor header file -- it should be self-explanatory.

Re: AppDelegate vs Custom View Controllers for Download Task...

2015-06-16 Thread Alex Zavatone
Why not just create a singleton to manage the processes? Putting it in the appDelegate sounds like "I'm putting it there because I don't know where else to put it". Declare an object that exists as long as you need it to, put the code in there, dispose of it when you don't need it anymore. O

Trouble With NSURLSession...

2015-06-16 Thread Peters, Brandon
Hello, I am creating a class to handle downloading my app’s data. I am using Xcode with iOS 8.4 SDK and I keep getting from the compiler that there is no initializer for NSURLSession that accepts the list of arguments I am using: import UIKit class HSNDataManager: NSObject, NSURLSessionDelega

Trouble With NSURLSession...

2015-06-16 Thread Peters, Brandon
Here is the exact compiler message: swift:20:26: Cannot find an initializer for type 'NSURLSession' that accepts an argument list of type '(configuration: NSURLSessionConfiguration, delegate: HSNDataManager.Type, delegateQueue: nil)' Hello, I am creating a class to handle downloading my app’s

Re: Trouble With NSURLSession...

2015-06-16 Thread Peters, Brandon
Figured it out: Needed to be -> var urlSession = NSURLSession(configuration: urlSessionConfiguration, delegate: HSNDataManger.dataManager, delegateQueue: nil) On Jun 16, 2015, at 10:42 PM, Peters, Brandon mailto:bap...@my.fsu.edu>> wrote: Hello, I am creating a class to handle downloading m

Re: Trouble With NSURLSession...

2015-06-16 Thread Marco S Hyman
> swift:20:26: Cannot find an initializer for type 'NSURLSession' that accepts > an argument list of type '(configuration: NSURLSessionConfiguration, > delegate: HSNDataManager.Type, delegateQueue: nil)’ You are passing “self” as the delegate in a *class* method. The class is not a NSURLSessionD

Re: Trouble With NSURLSession...

2015-06-16 Thread Quincey Morris
> On Jun 16, 2015, at 19:45 , Peters, Brandon wrote: > > swift:20:26: Cannot find an initializer for type 'NSURLSession' that accepts > an argument list of type '(configuration: NSURLSessionConfiguration, > delegate: HSNDataManager.Type, delegateQueue: nil)' The function that calls this is a

Re: Trouble With NSURLSession...

2015-06-16 Thread Greg Parker
> On Jun 16, 2015, at 7:45 PM, Peters, Brandon wrote: > > Here is the exact compiler message: > > swift:20:26: Cannot find an initializer for type 'NSURLSession' that accepts > an argument list of type '(configuration: NSURLSessionConfiguration, > delegate: HSNDataManager.Type, delegateQueue:

Re: Language options: Objective-C, Swift, C or C++?

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 11:14 , Kyle Sluder wrote: > > You know what I look like with a bad haircut Your haircut is fine, but you were unlucky to be co-presenting with Tony, who had the best haircut amongst any of the presenters I’ve seen both far. I’d sell my soul for that haircut. ___

access modifiers in protocols

2015-06-16 Thread Roland King
Is there a good linguistic reason why access modifiers which restrict access should not be allowed in protocols? I mean something like this public protocol Foo { mutating func foo( Int )->Void internal var bar : Array { get set } // <-

Re: access modifiers in protocols

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 21:58 , Roland King wrote: > > Is there a good linguistic reason why access modifiers which restrict access > should not be allowed in protocols? I mean something like this > > public protocol Foo > { > mutating func foo( Int )->Void >

Re: access modifiers in protocols

2015-06-16 Thread Roland King
> On 17 Jun 2015, at 13:15, Quincey Morris > wrote: > > The rest of your explanations is TMI, I can’t wrap my brain around it, but > why can’t you do this: > >> public protocol Foo >> { >> mutating func foo( Int )->Void >> } >> >> internal protocol FooImpleme

Re: access modifiers in protocols

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 22:24 , Roland King wrote: > > 1) making FooImplementedWithArray internal downgrades the foo() function to > internal within that protocol, no longer is it public (this is made explicit > by a compiler warning which tells you you’re implementing an internal > function as pu

Re: access modifiers in protocols

2015-06-16 Thread Roland King
> On 17 Jun 2015, at 13:33, Quincey Morris > wrote: > > On Jun 16, 2015, at 22:24 , Roland King > wrote: >> >> 1) making FooImplementedWithArray internal downgrades the foo() function to >> internal within that protocol, no longer is it public (this is made explicit >>

Re: access modifiers in protocols

2015-06-16 Thread Quincey Morris
On Jun 16, 2015, at 22:37 , Roland King wrote: > > No - can’t have a stored property in an extension (Someone just asked basically the same question in the dev forums, but with a different example. Was that you?) The following compiles for me without error: > public protocol Foo { > mut