Re: Question about enums

2015-07-17 Thread Michael de Haan 
Could you elaborate on the persistence aspect…as this is what I will be needing. Thanks > On Jul 17, 2015, at 2:04 PM, iseecolors wrote: > > As long as you only need one customer defined enum and it is not expected to > persist, than this will work. > >> On Jul 17, 2015, at 1:57 PM, Stephen

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-17 Thread Martin Wierschin
I just had a beta tester contact me about a very similar error/crash. It's slightly different than I've seen before, but it certainly seems related. The tester was closing a window backed by NSDocument. In response the AppKit document machinery was attempting to create an NSSavePanel, to allow t

Re: WebView and cookies

2015-07-17 Thread Mirko Viviani
On Jul 16, 2015, at 18:19, Jens Alfke wrote: >> On Jul 16, 2015, at 3:37 AM, Mirko Viviani > > wrote: >> >> I’m using the following code for FaceBook authentication with custom cookie >> management (-setHTTPShouldHandleCookies:NO), >> but recently it has stopped work

Re: Question about enums

2015-07-17 Thread iseecolors
As long as you only need one customer defined enum and it is not expected to persist, than this will work. > On Jul 17, 2015, at 1:57 PM, Stephen J. Butler > wrote: > > Or what about this? Tested this time... > > enum Foo { >case Bar >case Etc >case Etc_Etc >case Custom(String

Re: Question about enums

2015-07-17 Thread Michael de Haan 
Quincey and Stephen Thank you for your great input. And..yes..it does compile!!! :-) > On Jul 17, 2015, at 1:57 PM, Stephen J. Butler > wrote: > > Or what about this? Tested this time... > > enum Foo { > case Bar > case Etc > case Etc_Etc > case Custom(String) > > func as

Re: Question about enums

2015-07-17 Thread Stephen J. Butler
Or what about this? Tested this time... enum Foo { case Bar case Etc case Etc_Etc case Custom(String) func asString() -> String { switch self { case .Bar: return "Bar" case .Etc: return "Etc" case .Etc_Etc: return "Etc Etc" case .Custom(

Re: Question about enums

2015-07-17 Thread Stephen J. Butler
Oops, yes, obviously I haven't played much with raw representable enums yet :) Thanks for the correction. On Fri, Jul 17, 2015 at 3:39 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > On Jul 17, 2015, at 13:33 , Stephen J. Butler > wrote: > > > How about using a Custom option w

Re: Question about enums

2015-07-17 Thread Michael de Haan 
I did look at that, but , certainly in Playground, it produces this error. enum with raw type cannot have cases with arguments case Custom(String) On Jul 17, 2015, at 1:33 PM, Stephen J. Butler wrote: > > How about using a Custom option with an associated String value? > > enum Foo:String { >

Re: Question about enums

2015-07-17 Thread Quincey Morris
On Jul 17, 2015, at 13:33 , Stephen J. Butler wrote: > > How about using a Custom option with an associated String value? > > enum Foo:String { > >case Bar = “Bar" >case Etc = “Etc" >case Etc_Etc = “Etc Etc" >case Custom(String) > } Unfortunately that won’t compile. One alterna

Re: Question about enums

2015-07-17 Thread Stephen J. Butler
How about using a Custom option with an associated String value? enum Foo:String { case Bar = “Bar" case Etc = “Etc" case Etc_Etc = “Etc Etc" case Custom(String) } On Fri, Jul 17, 2015 at 2:53 PM, Michael de Haan  wrote: > I wonder if I can get some input as I seemed to have

Re: Question about enums

2015-07-17 Thread Michael de Haan 
Thanks for the quick reply. I’ll venture down that avenue > On Jul 17, 2015, at 1:10 PM, iseecolors wrote: > > enum can not have dynamic cases, so adding new cases on the fly based on > customer input would not work. > > However, a struct could have a dictionary or array property and that

Re: Question about enums

2015-07-17 Thread iseecolors
enum can not have dynamic cases, so adding new cases on the fly based on customer input would not work. However, a struct could have a dictionary or array property and that property could grow with customers input. You will still need a way to store the inputs - assuming you want to be able to

Question about enums

2015-07-17 Thread Michael de Haan 
I wonder if I can get some input as I seemed to have hit a wall in Swift, 2.0 My App uses structs and enums to hold the bulk of the data needed for it’s default values (probably over 95%). So, for example, enum Foo:String { case Bar = “Bar" case Etc = “Etc" case Etc_Etc = “Etc

Re: NSSecureCoding with containers (or, is NSArray lying?)

2015-07-17 Thread Tony Parker
Hi André, The way that NSSecureCoding works is by creating a stack of allowed classes. When a class calls decodeObjectOfClasses:forKey:, the classes argument is pushed onto the stack. If it calls decodeObjectForKey:, then nothing is pushed onto the stack. When decoding, the decoder looks at the

Re: Helper App - xcode

2015-07-17 Thread Jonathan Mitchell
> On 17 Jul 2015, at 17:58, Alex Kac wrote: > > Perhaps I'm using the wrong search terminology - but what is the > correct method to essentially add a helper app to an existing app? > > Specifically, I'm looking to: > a) Have it faceless (I know how to do that) > b) Option to run at launch if t

Re: Helper App - xcode

2015-07-17 Thread Jens Alfke
> On Jul 17, 2015, at 9:58 AM, Alex Kac wrote: > > So c is my real question. The way I would think to do it is to add the > helper app to the Copy Bundle Resources phase. Yup. Add the helper-app target as a dependency of your main target too, to ensure that it’s up to date when you copy it. I

Helper App - xcode

2015-07-17 Thread Alex Kac
Perhaps I'm using the wrong search terminology - but what is the correct method to essentially add a helper app to an existing app? Specifically, I'm looking to: a) Have it faceless (I know how to do that) b) Option to run at launch if the user wants it to (I think I know how to do that) - (http:

Re: C Sharp?

2015-07-17 Thread Gary L. Wade
That link isn't very useful. It pretty much regurgitates what Apple has already published and doesn't address the issue of rejection. Nevertheless, it's not my concern anymore, but I've forwarded your statements on to the team for further evaluation. -- Gary L. Wade (Sent from my iPhone) http://

Re: C Sharp?

2015-07-17 Thread Jonathan Mitchell
> On 17 Jul 2015, at 16:48, Gary L. Wade wrote: > > As mentioned before, the app I referred to that Apple flagged was for the Mac > App Store not the iOS App Store. If what you say is true, the current team > will probably want to try again even after a recent rejection (far more > recent tha

Re: C Sharp?

2015-07-17 Thread Gary L. Wade
As mentioned before, the app I referred to that Apple flagged was for the Mac App Store not the iOS App Store. If what you say is true, the current team will probably want to try again even after a recent rejection (far more recent than 2010; we even talked with an evangelist a few months ago);

Re: C Sharp?

2015-07-17 Thread Jens Alfke
> On 16 Jul 2015, at 21:26, Gary L. Wade > wrote: > > Just keep in mind that according to Apple's App Store rules, this qualifies > as interpreted code. I worked on a really well known app that used a C# > component for a fairly important piece of functiona

RE: NSSecureCoding with containers (or, is NSArray lying?)

2015-07-17 Thread André Francisco
Hm. I was specifically thinking of unrecognised selector exceptions, although I might have came up with a much more dangerous scenario: recognised selectors. What happens if the instantiated class *does* recognise the selector, but it doesn't quite do what you think it does. Say, -open, or -unl

Re: C Sharp?

2015-07-17 Thread Jonathan Mitchell
> On 16 Jul 2015, at 21:26, Gary L. Wade wrote: > > Just keep in mind that according to Apple's App Store rules, this qualifies > as interpreted code. I worked on a really well known app that used a C# > component for a fairly important piece of functionality, and that part could > not be in

Re: C Sharp?

2015-07-17 Thread Jonathan Mitchell
> On 17 Jul 2015, at 09:08, Uli Kusterer wrote: > > On 14 Jul 2015, at 19:48, Dave wrote: >> Does anyone know of a tool/framework that allows C# code to be compiled and >> called from Cocoa? > > Dave, > > are you aware of Elements (http://www.elementscompiler.com/elements/) ? It's > not qui

Re: C Sharp?

2015-07-17 Thread Dave
> On 17 Jul 2015, at 09:08, Uli Kusterer wrote: > > On 14 Jul 2015, at 19:48, Dave wrote: >> Does anyone know of a tool/framework that allows C# code to be compiled and >> called from Cocoa? > > Dave, > > are you aware of Elements (http://www.elementscompiler.com/elements/) ? It's > not qui

Re: C Sharp?

2015-07-17 Thread Uli Kusterer
On 14 Jul 2015, at 19:48, Dave wrote: > Does anyone know of a tool/framework that allows C# code to be compiled and > called from Cocoa? Dave, are you aware of Elements (http://www.elementscompiler.com/elements/) ? It's not quite your solution, but it allows creating a C# app that calls ObjC