Ahh..thanks for the reply Zach. I didn’t actually see your reply until now.
I’ll see how I can adjust my code.
Thanks for this!
> On Sep 29, 2016, at 4:38 PM, Zach Waldowski wrote:
>
> Error types themselves shouldn’t generally cross into Objective-C, because
> you don’t get interop; for tha
Hi,
I’ve actually switched our implementation to:
/// The type of an error code.
@objc public enum FoundationErrorCode: Int {
/// An ARCOperationCondition failed during evaluation
case operationConditionFailed = 1
/// An ARCOperation failed during execution
case operationExe
Error types themselves shouldn’t generally cross into Objective-C, because you
don’t get interop; for that, we have Error, which crosses the bridge as NSError.
If it’s instructive to think of it this way, both Objective-C and Swift should
define errors in their best native way, and use NSError.
All access control modifiers have a degenerate case (roughly) equivalent to
another one, and the typical wisdom for which to choose is to analyze your
intent and perhaps future intent.
“fileprivate” and “private” are identical at global scope.
“internal” and “fileprivate” are identical in single
Hi,
SwiftPM finds the first matching .pc file in the list of search paths,
unfortunately the environment variable PKG_CONFIG_PATH was last in the
list. It was corrected in this commit:
https://github.com/apple/swift-package-manager/commit/ac0479653032ded2efa1d71ab290d5b8d66c0e82
Can you try with a
Newbie question. How can I tell that PKG_CONFIG_PATH is being respected?
I am using Swift 3.0 (swiftlang-800.0.49) under OS X. I do not have pkg-config
installed. I have specified the PKG_CONFIG_PATH environment variable and have
validated the .pc files at that location. The project builds
> On Sep 28, 2016, at 23:00, Adrian Zubarev via swift-users
> wrote:
>
> struct B : RawRepresentable {
>
> let rawValue: Int
>
> // init?(rawValue: Int) {
> //
> // self.rawValue = rawValue
> // }
>
> static let c: B = B(rawValue: 0)
> static let d: B = B(ra
Hello all,
We are proceeding to update all of our Swift code to Swift 3 now and had a few
questions about the proper way to implement Errors. We need these entities to
be available in Objective-C and they are actively being used in Swift classes
marked as @objc.
I read:
https://github.com/app
Next question in my migration. How do I do what this did in Swift 2.2?
let theData = String.init(bytes: data.memory, length: length, encoding:
NSUTF8StringEncoding)
The only initialisers that have a length are
init?(bytesNoCopy: UnsafeMutableRawPointer, length: Int, encoding:
String.Encoding
On 28 Sep 2016, at 18:39, Michael Ilseman wrote:
> Could you share the generated interface for these functions, so that we can
> see how they are being imported into Swift?
Based on some random expat docs I found on the ’net [1], I grabbed the relevant
declarations and put them in a bridging
On 28 Sep 2016, at 17:18, Nevin Brackett-Rozinsky via swift-users
wrote:
> To answer the original question: at file scope the access modifiers `private`
> and `fileprivate` have exactly the same effect. It does not matter which of
> them you use there.
Right, but that doesn’t tell you which
fileprivate and private aren’t the same thing :
try this on a playground :
class Foo {
fileprivate let test = "test"
private let test2 = "test2"
}
let foo = Foo()
foo.test
foo.test2
You can see that foo.test work because his scope is the file whereas test2
doesn’t compile :
er
Hi,
I just realized that the official Swift page here:
https://developer.apple.com/swift/ has a spiral drawing example for the
Playgrounds (look at the first big picture on top of the page). It seems like
an interesting example to play with, especially for my kids.
However, when I looked at the
13 matches
Mail list logo