On 11 Nov 2017, at 01:51, Marco S Hyman via swift-users
wrote:
>
>> My report was closed as a duplicate of 30350792.
>
> Are you still seeing this on 10.13?
I don’t know, let me test...
Very good... the copy fails into the catch block as it should using Xcode 9.1
on macOS 10
> On Nov 11, 2017, at 2:07 PM, John Brownie wrote:
>
> And that's the point. The throw does not happen. An error is logged, but
> execution continues as though there was no error.
Also...
My workaround for this bug assumes you tested for the destination file presence
BEFORE doing the copy a
> Running on macOS 10.12.6, Xcode 8.3.2, I get to the copyItem call, which
> shows an error on the console:
>
> 2017-11-11 11:18:25.931446+1000 MyApp[32662:2408351] open on /path/to/file:
> Permission denied
>
> But it doesn't go to either of my catch blocks, but goes to the following
> line,
> On Jul 7, 2017, at 9:48 PM, Zhao Xin wrote:
>
> Thank you very much Marco. But What is “outside of an initializer” really
> bothers me. **Both** `func bar(keysAndValues:Dictionary)`
> works now. **Are they really outside ?**
Uhhh, that is certainly not the results I’d have expected. Perha
> init(keysAndValues:Dictionary) {
> self.keys.append(contentsOf: keysAndValues.keys)
> }
>
> Above code doesn't call `didSet` in playground. My .swift file is similar and
> didn't call `didSet` either. However, if without a struct, `didSet` is called.
“If you don’t need to
> but what I am looking for is something that lists the various protocols and
> types that make up the standard library with links to the reference pages for
> the types and protocols. Does documentation like this exist? I thought I have
> seen this documentation before but for the life of me I
> On Jun 29, 2017, at 4:20 PM, Jordan Rose wrote:
>
> That does sound like a bug to me. Can you make a self-contained test case and
> file at https://bugs.swift.org/ ?
Done. SR-5339
Marc
___
swift-users mailing list
swift-users@swift.org
https://lis
This macOS code in Xcode 8.3.3:
if !fileManager.fileExists(atPath: (saveFileURL.path)) {
do {
1 ==> try fileManager.linkItem(atPath: url.path, toPath: saveFileURL.path)
2 ==> } catch {
// couldn't create hard link, copy file instead
do {
3 ==>
> On Mar 10, 2017, at 12:32 PM, Proyb P via swift-users
> wrote:
>
> MacOS shown different behavior.
Running a playground using Xcode 8.2.1 on macOS 10.12.3 your code returns true
and the isDir value is also true.
Are you sure the directory “files” exists on your macOS test environment?
let
>>
> The problem with this solution is that this changes the semantics. I want a
> value for every Demo instance.
My error... I read too fast and missed the () instantiation of Demo in the
failing call. I was reading it as Demo.increment().
Never mind.
___
> The following code crashes:
>
> class Demo {
> var value = 0
> lazy var increment: (Int) -> Void = { [unowned self] by in
> self.value += by
> print(self.value)
> }
> }
>
> Demo().increment(3)
> error: Playground execution aborted: error: Execution was interrupted,
> reason: EXC
> On Feb 9, 2017, at 1:26 PM, Rick Mann via swift-users
> wrote:
>
> Is there any concise way to write the following?
>
> if let collection = someOptionalCollection
> {
>for item in collection
>{
>}
> }
someOptionalCollection?.map {
/* do something with $0 /*
}
_
> Except it does, because if I write
>
> let a = 2
> a is of type Int (at least, according to Xcode's code completion).
and if you write
let b = 2 + 0.5
2 is treated as a double. The type of the literal “2” varies with context. Do
you also find that inconsistent and confusing?
> Is there a way that avoids branching?
Don’t know. Have you profiled
let r = a > b ? 1 : 0
to know it is an issue?
>
> So, according to Xcode, "true" and "a > b" both have type "Bool". I don't
> know why the compiler allows one and not the other, except that it's literal,
> and I guess ther
On Nov 1, 2016, at 11:42 PM, Zhao Xin via swift-users
wrote:
>
> I have already give a workable implementation above.
Your implementation assume \(x) is always %@x. What does it do when given --
to use an example from the swift book:
"\(multiplier) times 2.5 is \(Double(multiplier) * 2.5)”
>
> On a broader note, I have yet to see a true modern replacement for SQLite on
> the embedded side. There are any number of lightweight document stores, but
> they either have performance worse than SQLite, or are not really suitable
> for embedded use.
Realm ???
It’s faster than sqlite and
> On Sep 28, 2016, at 8:04 AM, Jens Alfke via swift-users
> wrote:
>
>
>> On Sep 28, 2016, at 12:16 AM, Cao Jiannan via swift-users
>> wrote:
>>
>> I think the Swift team should tell us which is better.
>
> If one were better than the other, they wouldn’t both exist...
>
> It depends on w
> On Sep 21, 2016, at 2:22 PM, Jens Persson via swift-users
> wrote:
>
> // This little Swift program compiles (and runs) fine:
>
> func foo() -> Int { return a }
> let a = 1
> let b = 2
> print(foo())
>
> But if `foo()` returns `b` instead of `a`, I get this compile time error:
> "Use of unr
On Sep 13, 2016, at 6:53 PM, Shyamal Chandra via swift-users
wrote:
>
> I am not arguing; I am bringing up defect in the Apple way of handling bugs
> for Swift, Xcode, and Playgrounds. Am I supposed to wait for eternity?
As Jens noted, you have to separate Swift from Xcode and Playgrounds.
> 6. It’s still using the old compiler and my code fails to build.
Select your target. Click on the Build Settings Tab. Scroll down to the Swift
Compiler - Version group and change Use Legacy Swift Language Version from Yes
to No.
I haven’t a clue if that will actually work. It’s worth a t
> On Jun 19, 2016, at 6:35 PM, Maury Markowitz via swift-users
> wrote:
>
> All true, except, of course, when one is working with strings that really do
> work perfectly weel qwith 1...2, like the strings I'm processing, which came
> from 80-column punch cards originally used with LLNL's CDC
> On Jun 18, 2016, at 2:55 PM, Rod Brown via swift-users
> wrote:
>
> From what I understand, these dylibs are very light
Not always so light as earlier discussed on this list. An Xcode 8 Swift 3
compile shows swift Frameworks taking 9.2 MB of the 11.5 MB total app size for
an OS X app I’
> On Fri, Jun 17, 2016 at 9:33 PM, Maury Markowitz via swift-users
> wrote:
> I was asked to try out the latest betas of Cocoa to check if a SceneKit bug I
> reported has been fixed. As part of this I decided to try an update to Swift
> 3. I've run into a number of minor issues, but one has me
On Jun 15, 2016, at 5:37 PM, Seth Friedman via swift-users
wrote:
>
> Does anyone know if the runtime libs definitively increased in size in Swift
> 3? I could have sworn I heard 4.5 MB for Swift 2.
The total of the Frameworks dir in a Swift 2.2 app I have is 5.8M. The
breakdown for this app
My first try with 5/31 swift 3 snapshot gave me a warning regarding an unused
return value -- in main.swift. Wouldn’t you know, NS ApplicationMain is
declared as
func NSApplicationMain(_ argc: Int32,
_ argv: UnsafeMutablePointer?>) -> Int32
And what does the second line of function help s
> On May 18, 2016, at 11:03 AM, Artyom Goncharov via swift-users
> wrote:
>
> Yes, of course I can use API method but this kind of behaviour for subscript
> operator seems inconsistent(or even magical) to me because it is possible to
> initialise a dictionary with nil without casting it. Thou
On May 12, 2016, at 10:38 PM, Tyler Fleming Cloutier via swift-users
wrote:
>
> Hello everyone,
>
> It does seem like it is currently possible to wrap just the function
> declaration in an #if swift() directive like so:
>
> #if swift(>=3.0)
> public func add(filter filterName: String, path: S
On Apr 17, 2016, at 12:36 PM, Dennis Weissmann
wrote:
>
> Thanks Brent!
Ditto. It got me to the next step, anyway. I suspect I’m going to have to add
@objc(...) for each of the delegate functions, etc.
Marc
___
swift-users mailing list
swift-users
Hey Marc,
>
> You didn’t explicitly state the problem you’re running into but I assume you
> can’t build the app.
The app builds fine. Running the app gives me errors such as "Must implement
numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:” when the
swiftified version "n
Is this the appropriate list to ask questions regarding the 3.0 snapshots?
I’ve hand converted a small OS X app such that it compiles using the 2016-04-12
snapshot to get a feel for the changes. Now I’m trying to get it to run.
Marc
___
swift-users ma
30 matches
Mail list logo