Talking to other apps

2014-08-04 Thread Gerriet M. Denkmann
My app wants to talk to some app-friend. Like sending a string and getting another string back. Or something slightly more complicated. In the good old days I would have used Distributed Objects, but this seems to be no longer the fashion. Xcode 6 does not provide any documentation about this

Re: Talking to other apps

2014-08-04 Thread Jerry Krinock
On 2014 Aug 03, at 23:54, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSPerformService (which also has the feel of not being well-loved), XPC, or what else? Yes. Start by looking at XPC. ___ Cocoa-dev mailing list

Re: Talking to other apps

2014-08-04 Thread Pax
Why would you not use NSNotificationCenter for this? On 4 Aug 2014, at 15:51, Jerry Krinock je...@ieee.org wrote: On 2014 Aug 03, at 23:54, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSPerformService (which also has the feel of not being well-loved), XPC, or what else? Yes.

Re: Talking to other apps

2014-08-04 Thread Kyle Sluder
On Aug 4, 2014, at 7:55 AM, Pax 45rpmli...@googlemail.com wrote: Why would you not use NSNotificationCenter for this? Because that doesn’t do IPC. And NSDistributedNotificationCenter is severely restricted in sandboxed apps. --Kyle Sluder ___

Re: Talking to other apps

2014-08-04 Thread Jens Alfke
On Aug 3, 2014, at 11:54 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app wants to talk to some app-friend. Like sending a string and getting another string back. Or something slightly more complicated. AppleEvents is the traditional mechanism for inter-app messaging. —Jens

Re: Talking to other apps

2014-08-04 Thread Kevin Meaney
When you say app-friend, what do you mean? Another application? An XPC service? Some other kind of service? If your App is sandboxed and the service is not an xpc service embedded in your application then I think your pretty much out of luck. Kevin On 4 Aug 2014, at 07:54, Gerriet M. Denkmann

Re: Talking to other apps

2014-08-04 Thread Gerriet M. Denkmann
On 4 Aug 2014, at 22:57, Kevin Meaney k...@yvs.eu.com wrote: When you say app-friend, what do you mean? Another application? An XPC service? Some other kind of service? I mean two apps, which are both written (and thus can be modified) by me. I really should have mentioned this in my

Re: Talking to other apps

2014-08-04 Thread Scott Ribe
On Aug 4, 2014, at 11:23 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I mean two apps, which are both written (and thus can be modified) by me. I really should have mentioned this in my original post. Sorry about this. Showing my age here, but as an old UNIX troll, and assuming the apps

Re: Talking to other apps

2014-08-04 Thread Uli Kusterer
On 04 Aug 2014, at 08:54, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app wants to talk to some app-friend. Like sending a string and getting another string back. Or something slightly more complicated. I don't think there's a good way to do this if you're sandboxed. But as a

Re: Talking to other apps

2014-08-04 Thread Scott Ribe
On Aug 4, 2014, at 11:47 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote: You can have a domain that is shared by two apps from the same manufacturer. Careful, I've had lots of problems with that--changes to defaults not being saved when you synch, and so forth. -- Scott Ribe

Re: Talking to other apps

2014-08-04 Thread Jens Alfke
On Aug 4, 2014, at 10:41 AM, Scott Ribe scott_r...@elevated-dev.com wrote: Showing my age here, but as an old UNIX troll, and assuming the apps are not sandboxed, I'd just use domain sockets. https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man4/unix.4.html

Re: Talking to other apps

2014-08-04 Thread Alex Zavatone
If you want to go down the sockets path, there are clear examples on using NSStream, sockets and Bonjour to send info between apps that are on the same Mac. Check out the PictureSharing sample and other NSStream samples that are included in the Xcode help. All I had to do to get this to work

Preventing empty NSTextFields that use NSNumberFormatter

2014-08-04 Thread Sean McBride
Hi all, NSNumberFormatter, applied to an NSTextField, will very nicely reject things like letters, and optionally a bunch of things like negative numbers, non-integers, etc. But I've just noticed that it doesn't seem to help if the textfield is left entirely empty. Is that not something

Re: Talking to other apps

2014-08-04 Thread Jens Alfke
On Aug 4, 2014, at 11:02 AM, Alex Zavatone z...@mac.com wrote: If you want to go down the sockets path, there are clear examples on using NSStream, sockets and Bonjour to send info between apps that are on the same Mac. Check out the PictureSharing sample and other NSStream samples that

Re: Talking to other apps

2014-08-04 Thread Uli Kusterer
On 04.08.2014, at 19:51, Scott Ribe scott_r...@elevated-dev.com wrote: On Aug 4, 2014, at 11:47 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote: You can have a domain that is shared by two apps from the same manufacturer. Careful, I've had lots of problems with that--changes to

Re: Talking to other apps

2014-08-04 Thread Scott Ribe
On Aug 4, 2014, at 2:23 PM, Uli Kusterer witness.of.teacht...@gmx.net wrote: What OS version was that with? It's definitely not easy in the old Prefs mechanism, but it should have improved a lot with the new prefs in 10.9 (or was it already in 10.8?) Well, basically there's now a central

Re: Talking to other apps

2014-08-04 Thread Kyle Sluder
On Mon, Aug 4, 2014, at 03:23 PM, Uli Kusterer wrote: On 04.08.2014, at 19:51, Scott Ribe scott_r...@elevated-dev.com wrote: On Aug 4, 2014, at 11:47 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote: You can have a domain that is shared by two apps from the same manufacturer.

applicationWillFinishLaunching vs. applicationDidFinishLaunching for NSDocument-based apps

2014-08-04 Thread Daryle Walker
A lot of sample code I see on web pages about application delegates use the applicationDidFinishLaunching: method for setting up any application-global data or routines. I just read a page about the Cocoa app initialization order, and it had the various NSDocument and NSDocumentController

Re: applicationWillFinishLaunching vs. applicationDidFinishLaunching for NSDocument-based apps

2014-08-04 Thread Lee Ann Rucker
On Aug 4, 2014, at 1:42 PM, Daryle Walker dary...@mac.com wrote: A lot of sample code I see on web pages about application delegates use the applicationDidFinishLaunching: method for setting up any application-global data or routines. I just read a page about the Cocoa app initialization

Re: Preventing empty NSTextFields that use NSNumberFormatter

2014-08-04 Thread Keary Suska
On Aug 4, 2014, at 12:01 PM, Sean McBride s...@rogue-research.com wrote: NSNumberFormatter, applied to an NSTextField, will very nicely reject things like letters, and optionally a bunch of things like negative numbers, non-integers, etc. But I've just noticed that it doesn't seem to

Re: Talking to other apps

2014-08-04 Thread Kyle Sluder
On Mon, Aug 4, 2014, at 04:17 PM, Uli Kusterer wrote: Well, what other communication mechanisms are there for talking between sandboxed apps ... ? I *did* call it a last-ditch thing. XPC and Apple Events (as long as your sdef uses access groups). --Kyle Sluder

Re: Talking to other apps

2014-08-04 Thread Kevin Meaney
On 4 Aug 2014, at 22:49, Kyle Sluder k...@ksluder.com wrote: On Mon, Aug 4, 2014, at 04:17 PM, Uli Kusterer wrote: Well, what other communication mechanisms are there for talking between sandboxed apps ... ? I *did* call it a last-ditch thing. XPC and Apple Events (as long as your sdef

center-y constant animation won't animate

2014-08-04 Thread Rick Mann
I'm setting the constant of a center-y-in-container constraint in a [UIView animateWith…] block, but it doesn't animate; it just jumps to the offset location. Any idea what I might be doing wrong? The code is pretty straightforward… https://pastee.org/edgsf I tried calling

Re: center-y constant animation won't animate

2014-08-04 Thread David Duncan
On Aug 4, 2014, at 4:10 PM, Rick Mann rm...@latencyzero.com wrote: I'm setting the constant of a center-y-in-container constraint in a [UIView animateWith…] block, but it doesn't animate; it just jumps to the offset location. Any idea what I might be doing wrong? The code is pretty

Re: center-y constant animation won't animate

2014-08-04 Thread Ken Thomases
On Aug 4, 2014, at 6:10 PM, Rick Mann rm...@latencyzero.com wrote: I'm setting the constant of a center-y-in-container constraint in a [UIView animateWith…] block, but it doesn't animate; it just jumps to the offset location. Any idea what I might be doing wrong? The code is pretty

Re: center-y constant animation won't animate

2014-08-04 Thread Rick Mann
Ah, thank you. On Aug 4, 2014, at 16:15 , David Duncan david.dun...@apple.com wrote: On Aug 4, 2014, at 4:10 PM, Rick Mann rm...@latencyzero.com wrote: I'm setting the constant of a center-y-in-container constraint in a [UIView animateWith…] block, but it doesn't animate; it just jumps

Re: Talking to other apps

2014-08-04 Thread Roland King
On 4 Aug 2014, at 2:54 pm, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app wants to talk to some app-friend. Like sending a string and getting another string back. Or something slightly more complicated. In the good old days I would have used Distributed Objects, but this seems to

Re: Swift video/PDF files within the WWDC 2014 video list

2014-08-04 Thread sqwarqDev
There's also 404_sd_Advanced Swift 404_hd_Advanced Swift There's presumably a Session 405, but I can't find it. Anyone? On 11 Jun 2014, at 21:35, Alex Zavatone z...@mac.com wrote: Here are the names of the videos on Swift from the WWDC 2014 section of Apple.com

Re: Debugging Swift

2014-08-04 Thread James White
I'm experiencing the same things. As it's beta 1 I guess it's expected that it's going to be really buggy. I wrote a simple app the other day and i crashed xcode easily 50 times. I'm giving up on swift for now until the next beta where Im hoping Apple fixes a load of things. Also remember it's

Intercepting *all* keystrokes in NSView?

2014-08-04 Thread Alex Hall
Hello list, I have a subclass of NSView that is set to be my window's first responder. It intercepts keystrokes by implementing keyUp: and performKeyEquivalent: but it doesn't do quite what I need. I have to intercept as many keystrokes as I possibly can, including those bound to menu items or

Re: Swift video/PDF files within the WWDC 2014 video list

2014-08-04 Thread Roland King
No 405. I think that session was a lab. The issue I’m having right now with Swift is I can’t keep up with it, no pun intended. It’s great that Apple is being so responsive developing Swift as the community puts in bug reports and comments, but I wish at this point I could forget everything I

Re: Intercepting *all* keystrokes in NSView?

2014-08-04 Thread dangerwillrobinsondanger
On 2014/05/29, at 13:57, Alex Hall mehg...@icloud.com wrote: Hello list, I have a subclass of NSView that is set to be my window's first responder. It intercepts keystrokes by implementing keyUp: and performKeyEquivalent: but it doesn't do quite what I need You need to read the event

Re: Intercepting *all* keystrokes in NSView?

2014-08-04 Thread Ken Thomases
On May 28, 2014, at 11:57 PM, Alex Hall mehg...@icloud.com wrote: -(BOOL) performKeyEquivalent:(NSEvent*) event{ [self handleKeyUpAndKeyEquivalent:event]; return NO; return [super performKeyEquivalent:event]; } Everything works (well, basically) except those menu item

Problem with getting access to fields of Core Data model

2014-08-04 Thread Ronald Hofmann
See My code below. This works so far if I only use the field password for output. See line Here is the problem When changing to this instead, which should work in my opinion, I get Errors: txtGesamt.text = txtGesamt.text + \(res.username), \(res.password) \n