[swift-users] Bls: NSTask's terminate() is not yet implemented on Linux

2017-01-23 Thread Mr Bee via swift-users
I see. Thank you for the information and the trick. Yes, it works. Although I'm not sure killing a process is similar to terminating it, I think I can live with it. At least while it's not yet implemented. I mostly use it to terminate a long stucked processes anyway. Thank you. Regards,  –Mr

Re: [swift-users] NSTask's terminate() is not yet implemented on Linux

2017-01-23 Thread Will Field-Thompson via swift-users
From the source and from status document (search "terminate()"), it seems like the answer is

[swift-users] NSTask's terminate() is not yet implemented on Linux

2017-01-23 Thread Mr Bee via swift-users
Hi, I can't use terminate() function of (NS)Task on Linux because it's not yet implemented. I'm using Swift v.3.0.0 on 64-bit Ubuntu 14.04 LTS. Here's the error message upon calling the function: fatal error: terminate() is not yet implemented: file Foundation/NSTask.swift,  line 407 

Re: [swift-users] EnumerateUsingObjects in Swift

2017-01-23 Thread Zhao Xin via swift-users
It seems to me that you didn't initialize your `myArray` before you casted it. That caused the problem. Zhaoxin On Tue, Jan 24, 2017 at 9:34 AM, Jon Shier via swift-users < swift-users@swift.org> wrote: > enumerateObjects(options:using:) exists on NSArray in Swift. And I was > able to create

[swift-users] EnumerateUsingObjects in Swift

2017-01-23 Thread Doug Hill via swift-users
I'm trying to accomplish the equivalent functionality of -[NSArray enumerateUsingObjects:…] in Swift. Doing a Googles search, I see that one would need to call the equivalent method on the bridged NSArray version of your Swift array: var myNSArray : NSArray = mySwiftArray as NSArray Here's

Re: [swift-users] Protocol extension gotcha... or bug?

2017-01-23 Thread Zhao Xin via swift-users
Wagner, the `extension` of `protocol` is never dynamic. It is `fail safe`. It means if you don't implement something, the compiler will use the implementation in the `protocol extension`. As in swift, struct and enum can also conform protocols. If you want the other way, you should do it in a

Re: [swift-users] Protocol extension gotcha... or bug?

2017-01-23 Thread Slava Pestov via swift-users
> On Jan 23, 2017, at 7:31 AM, Wagner Truppel via swift-users > wrote: > > Say you have a protocol and an extension of it, like so: > > protocol P { > var item: String { get } > } > > extension P { > var item: String { > return "P" > } > } > > Now imagine

Re: [swift-users] ranges and min

2017-01-23 Thread J.E. Schotsman via swift-users
> On 23 Jan 2017, at 16:12, Wagner Truppel wrote: > > Is it possible that the enclosing scope exposes a definition of min that > might take precedence over Swift.min unless you namespace the invocation? You are right. The code is part of a Data extension. Data is a

Re: [swift-users] App Review

2017-01-23 Thread Josh Parmenter via swift-users
I’m not sure if this is the best forum for this question, since this list is geared towards the usage of Swift, not with Apple App Store development. The guidelines can be strict. Have you asked to speak directly with someone through the developer portal? Hope that helps. Josh > On Jan 23,

Re: [swift-users] ranges and min

2017-01-23 Thread Wagner Truppel via swift-users
Is it possible that the enclosing scope exposes a definition of min that might take precedence over Swift.min unless you namespace the invocation? > On 23 Jan 2017, at 14:58, J.E. Schotsman via swift-users > wrote: > > This doesn’t compile: > > let data1 =

[swift-users] App Review

2017-01-23 Thread James Stacy via swift-users
I have been working on an app for two years and now have been trying to get it reviewed. Apple will not review my app. They delay keep it in waiting for review. When it finally gets in review they kick it out on. You are using location when not in use. (Yes I track the location so it can be

Re: [swift-users] ranges and min

2017-01-23 Thread Quinn "The Eskimo!" via swift-users
On 23 Jan 2017, at 14:58, J.E. Schotsman via swift-users wrote: > This doesn’t compile … How are you testing this? I replaced the `main.swift` of a new test tool project (in Xcode 8.2, choose Xcode > New > Project > macOS > Command Line Tool) and it compiled without

Re: [swift-users] Compiler should issue a warning when a subclass implementation with default values matches a parent implementation without them

2017-01-23 Thread Wagner Truppel via swift-users
Issued created: https://bugs.swift.org/browse/SR-3700 > On 23 Jan 2017, at 10:24, Quinn The Eskimo! via swift-users > wrote: > >> what’s the best way to get this request to the people who can make it happen > > File a Swift bug report. > > >

[swift-users] ranges and min

2017-01-23 Thread J.E. Schotsman via swift-users
This doesn’t compile: let data1 = Data(count:4) let data2 = Data(count:5) for i in 0..

Re: [swift-users] Why this string not work. Any and Optionals in dictionary

2017-01-23 Thread Ole Begemann via swift-users
I have a simple expression with Any and is not work. Why? vardictarray: [[String: Any]] = [["kek": nil]] \\ Nil is not compatible with expected dictionary value type 'Any' `nil` is just a literal value that doesn't have a specific type. Even though you want to put it in a dictionary whose

Re: [swift-users] Why this string not work. Any and Optionals in dictionary

2017-01-23 Thread Quinn "The Eskimo!" via swift-users
On 23 Jan 2017, at 10:24, Седых Александр via swift-users wrote: > I have a simple expression with Any and is not work. Why? The problem here is that: * `nil` is syntactic sugar for `Optional.none`, where `Optional` is generic on the `Wrapped` type * You’re not given

Re: [swift-users] Why this string not work. Any and Optionals in dictionary

2017-01-23 Thread Adrian Zubarev via swift-users
There is no universal `nil`. `nil` is typed. That said think of `nil` as a shorthand form for `Optional.none` -- Adrian Zubarev Sent with Airmail Am 23. Januar 2017 um 11:24:18, Седых Александр via swift-users (swift-users@swift.org(mailto:swift-users@swift.org)) schrieb: > > Hello. > I

Re: [swift-users] Compiler should issue a warning when a subclass implementation with default values matches a parent implementation without them

2017-01-23 Thread Zhao Xin via swift-users
I doubt if you could have done that in swift-evolution list. As for an evolution, it requests that you not only provides the question, but also must provide the answer and how to implementing in code together. Zhaoxin On Mon, Jan 23, 2017 at 6:04 PM, Wagner Truppel via swift-users <

Re: [swift-users] Compiler should issue a warning when a subclass implementation with default values matches a parent implementation without them

2017-01-23 Thread Wagner Truppel via swift-users
Ah, excellent! Thanks! Will do shortly. > On 23 Jan 2017, at 10:24, Quinn The Eskimo! via swift-users > wrote: > >> what’s the best way to get this request to the people who can make it happen > > File a Swift bug report. > > > > Please post

[swift-users] Why this string not work. Any and Optionals in dictionary

2017-01-23 Thread Седых Александр via swift-users
Hello. I have a simple expression with Any and is not work. Why? var dictarray: [[ String : Any ]] = [[ "kek" : nil ]]  \\ Nil is not compatible with expected dictionary value type 'Any' -- And in other hand this is work var dictarray: [[ String : Any ]] = [[:]]  \\ [[:]], dictarray

Re: [swift-users] enum compare

2017-01-23 Thread Quinn "The Eskimo!" via swift-users
On 21 Jan 2017, at 12:56, tridiak via swift-users wrote: > How do I fix this? Simply cannot see it. Use a switch statement: switch type { case .noType, .dodge, .other: return true case .natural, .armour, .shield, .deflection, .sacred, .luck: return false } Note