Re: Cocoa-dev Digest, Vol 13, Issue 415

2016-09-29 Thread Graham Cox
> On 30 Sep 2016, at 3:48 AM, Gabriel Zachmann wrote: > > I was just a little bit hesitant to use the regular ScreenSaverDefaults for > those really small pieces of data that change every time, > because I already use the ScreenSaverDefaults to store quite a bit of other > data (that changes o

Re: iOS app communicating with macOS app

2016-09-29 Thread Eric Dolecki
Thanks everyone. I used  multipeer this morning to do it.  Sent from Outlook on my phone. On Thu, Sep 29, 2016 at 7:31 PM -0400, "Georg Seifert" wrote: Maybe this helps: https://github.com/rsms/peertalk BestGeorg Seifert On 28 Sep 2016, at 14:57, Eric E. Dolecki wrote: I'd like to

Re: iOS app communicating with macOS app

2016-09-29 Thread Georg Seifert
Maybe this helps: https://github.com/rsms/peertalk Best Georg Seifert > On 28 Sep 2016, at 14:57, Eric E. Dolecki wrote: > > I'd like to make an iOS application communicate with a macOS application. > No App Store involvement - just to prototype something loc

Best way to make a little piece of data persistent?

2016-09-29 Thread Gabriel Zachmann
I need to make a few small pieces of data (an integer, a string, ...) persistent across different invocations of my screen saver. That is, when the screen saver is about to quit, I need to save it, when it gets invoked the next time, I need to load it again. What is the recommended (and easiest?)

Re: Cocoa-dev Digest, Vol 13, Issue 415

2016-09-29 Thread Gabriel Zachmann
>> >> I need to make a few small pieces of data (an integer, a string, ...) >> persistent across different invocations of my screen saver. >> >> That is, when the screen saver is about to quit, I need to save it, >> when it gets invoked the next time, I need to load it again. >> >> What is the r

Have tool tips displayed longer?

2016-09-29 Thread Gabriel Zachmann
Is there a way to adjust the duration how long the tool tips of my GUI are displayed during runtime? (I'd like macOS to display them longer than the default.) Best regards, Gabriel. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: URL.setResourceValues() in Swift 3

2016-09-29 Thread Quincey Morris
On Sep 29, 2016, at 13:29 , Rick Mann wrote: > > So, it turns out, destURL was a let, not a var. That made the difference. > Sure seems like a bad diagnostic. Yes, with that piece of extra information, I can see the same behavior in Xcode 8.1 that you originally described (with AnyObject inste

Re: URL.setResourceValues() in Swift 3

2016-09-29 Thread Rick Mann
> On Sep 29, 2016, at 10:54 , Quincey Morris > wrote: > > On Sep 29, 2016, at 04:18 , Rick Mann wrote: >> >> var vals = URLResourceValues() >> vals.isExcludedFromBackup = true >> try destURL.setResourceValues(vals) >> >> But I get "Cannot convert value of type 'URLResourceValues' to expected

Re: Normalising file names on macOS

2016-09-29 Thread Clark Cox
> On Sep 22, 2016, at 08:30, Ken Thomases wrote: > > On Sep 22, 2016, at 6:04 AM, John Brownie wrote: >> >> I find that I am in need of dealing with versions of strings that may be >> turned into file names, and thus I need to be comparing normalised forms. If you need to compare unicode str

Multipeer between macOS Sierra and iOS 10

2016-09-29 Thread Eric E. Dolecki
I emailed the list yesterday about getting communication going between an iOS application and a macOS one. I coded it up this morning and it works quite well. However the consoles are filled with Errors eventhough things are connected and send data back and forth. Things like: [ViceroyTrace] [ICE]

Re: URL.setResourceValues() in Swift 3

2016-09-29 Thread Quincey Morris
On Sep 29, 2016, at 04:18 , Rick Mann wrote: > > var vals = URLResourceValues() > vals.isExcludedFromBackup = true > try destURL.setResourceValues(vals) > > But I get "Cannot convert value of type 'URLResourceValues' to expected > argument type '[URLResourceKey : AnyObject]'" on the "vals" argu

Re: Implementing own text prediction on UITextField

2016-09-29 Thread David Duncan
There is not. > On Sep 29, 2016, at 4:34 AM, Devarshi Kulshreshtha > wrote: > > Currently when we type on a text field it shows text prediction over > keyboard on a bar, is there any way to populate the same with say a > dictionary, or a plist, etc. Basically populating it using own data source

NSSecureTextField and Umlaute and the likes

2016-09-29 Thread Michael Starke
I'm developing a password manager that uses an NSSecureTextField for the user to type a password. The Problem is, that on some keyboard layout keys like ñ have to be typed using multiple keys or can be inserted via a hold on the key and then selecting the special one via the popup. This works on

Implementing own text prediction on UITextField

2016-09-29 Thread Devarshi Kulshreshtha
Currently when we type on a text field it shows text prediction over keyboard on a bar, is there any way to populate the same with say a dictionary, or a plist, etc. Basically populating it using own data source rather than system data source. Any ideas guys? Thanks in advance. __

URL.setResourceValues() in Swift 3

2016-09-29 Thread Rick Mann
I don't know if Xcode 8 just has more bugs showing headers, or what. But I'm trying to make this call, as documented in the docs: let _ = fm.createIntermediateDirectories(destURL) try destURL.setResourceValues([. isExcludedFromBackup : true]) But I get "Value of type 'Bool' does not conform to

Re: Mystery Threads

2016-09-29 Thread Roland King
> On 29 Sep 2016, at 16:59, Gerriet M. Denkmann wrote: > > >> On 29 Sep 2016, at 15:34, Quincey Morris >> wrote: >> >> On Sep 29, 2016, at 01:05 , Gerriet M. Denkmann wrote: >>> >>> Well, nothing. Just let’s call it nbrOfBlocksToBeUsedByDispatchApply, or >>> whatever. But ultimately any o

Re: Mystery Threads

2016-09-29 Thread Gerriet M. Denkmann
> On 29 Sep 2016, at 15:34, Quincey Morris > wrote: > > On Sep 29, 2016, at 01:05 , Gerriet M. Denkmann wrote: >> >> Well, nothing. Just let’s call it nbrOfBlocksToBeUsedByDispatchApply, or >> whatever. But ultimately any of these things has to run on a CPU, of which >> there are no more th

Re: Mystery Threads

2016-09-29 Thread Daniel Vollmer
> On 29 Sep 2016, at 10:05, Gerriet M. Denkmann wrote: > > >> On 29 Sep 2016, at 14:38, Quincey Morris >> wrote: >> >> On Sep 29, 2016, at 00:15 , Gerriet M. Denkmann wrote: >>> >>> dispatch_apply( nbrOfThreads, queue, ^void(size_t idx) >>> >>> As my computer has just 8 CPUs, I though

Re: Mystery Threads

2016-09-29 Thread Quincey Morris
On Sep 29, 2016, at 01:05 , Gerriet M. Denkmann wrote: > > Well, nothing. Just let’s call it nbrOfBlocksToBeUsedByDispatchApply, or > whatever. But ultimately any of these things has to run on a CPU, of which > there are no more than 8. Well, here’s my narrative. It may be fiction or non-ficti

Re: Mystery Threads

2016-09-29 Thread Gerriet M. Denkmann
> On 29 Sep 2016, at 14:38, Quincey Morris > wrote: > > On Sep 29, 2016, at 00:15 , Gerriet M. Denkmann wrote: >> >> dispatch_apply( nbrOfThreads, queue, ^void(size_t idx) >> >> As my computer has just 8 CPUs, I thought that using nbrOfThreads > 8 would >> be silly: adding overhead wit

Re: Mystery Threads

2016-09-29 Thread Quincey Morris
On Sep 29, 2016, at 00:15 , Gerriet M. Denkmann wrote: > > dispatch_apply( nbrOfThreads, queue, ^void(size_t idx) > > As my computer has just 8 CPUs, I thought that using nbrOfThreads > 8 would > be silly: adding overhead without gaining anything. > > Turns out this is quite wrong. One f

Re: Mystery Threads

2016-09-29 Thread Aandi Inston
My thoughts are general, not specific to Mac OS... The idea that the best performance comes from threads = #CPUs is attractive, but will work only if the threads do not sleep and do not interfere with each other. A classic example is dividing up a complex calculation that runs without touching the

Mystery Threads

2016-09-29 Thread Gerriet M. Denkmann
I have a big array (like a few GB) which is operated upon by some functions. As these functions act purely local, an obvious idea is: - (void)someFunction { nbrOfThreads = ... sizeOfBigArray = ... a few GB stride = sizeOfBigArray / nbrOfThreads dispatch_ap