Re: Putting Xpc Helper into Library/LaunchAgents

2014-08-10 Thread Roland King
> On 10 Aug 2014, at 2:18 pm, Gerriet M. Denkmann wrote: > > I have an app with an Xpc Helper, which currently starts with: > NSXPCConnection( serviceName: xpcServiceName ) > But the goal is that two apps should talk to each other, the Xpc Helper being > used to exchange endpoints. > > S

Re: Putting Xpc Helper into Library/LaunchAgents

2014-08-10 Thread Gerriet M. Denkmann
On 10 Aug 2014, at 14:33, Roland King wrote: > >> On 10 Aug 2014, at 2:18 pm, Gerriet M. Denkmann wrote: >> >> I have an app with an Xpc Helper, which currently starts with: >> NSXPCConnection( serviceName: xpcServiceName ) >> But the goal is that two apps should talk to each other, the

Mod (%) function in C/Objective-C?

2014-08-10 Thread Dave
Hi, I just got caught out by the C/Objective-C Implementation of the % (mod) function in XCode C/Objective-C. I remember having this very same problem years ago (after I solved it again this time). It stems from the modulus (%) function not returning a true modulus for negative numbers - it re

Re: Bindings in Swift

2014-08-10 Thread Roland King
> >> if you write such a property in Swift and mark it only @objc then it's quite >> possible Swift will call the original, unswizzled methods, and you won't get >> your notification .. because objc_MsgSend may not be used > > Yes, I suppose if Swift decided to use a direct call, it would call

Re: Mod (%) function in C/Objective-C?

2014-08-10 Thread Keary Suska
On Aug 10, 2014, at 6:31 AM, Dave wrote: > I just got caught out by the C/Objective-C Implementation of the % (mod) > function in XCode C/Objective-C. I remember having this very same problem > years ago (after I solved it again this time). > > It stems from the modulus (%) function not retur

Advise on referencing NSDocument from custom view

2014-08-10 Thread Luc Van Bogaert
Hello, I'm creating a document-based drawing application and I'm looking for some expert advice on the approach to take for referencing my document from a custom view that will draw itself based on the data that is stored in the document object. My custom view, which you could see as a kind of

Re: Mod (%) function in C/Objective-C?

2014-08-10 Thread Scott Ribe
On Aug 10, 2014, at 9:16 AM, Keary Suska wrote: > I don't think so, although I would expect a C lib somewhere to address it. I think the standard C libs only have floating-point versions of mod functions. (That does seem like an odd omission.) This would at least be a tiny bit better if people

Re: Bindings in Swift

2014-08-10 Thread Quincey Morris
On Aug 10, 2014, at 06:46 , Roland King wrote: > And if anyone thinks Swift is all simplicity and scripty loveliness I came > across this StackOverflow question and answer today. It will be a while > before I entirely understand it, it will be a long while before I could > attempt to reproduce

Re: Obtaining baseline from CATextLayer

2014-08-10 Thread Kyle Sluder
> On Aug 9, 2014, at 9:50 PM, Graham Cox wrote: > > One of the things that bugs me about text on OS X is that it's laid out from > the top edge of a bounding box, not based off a baseline. Only if you use the legacy rendering methods. See NSStringDrawingUsesLineFragmentOrigin. > Am I missing

Re: Bindings in Swift

2014-08-10 Thread Kyle Sluder
On Aug 10, 2014, at 9:56 AM, Quincey Morris wrote: > >> On Aug 10, 2014, at 06:46 , Roland King wrote: >> >> And if anyone thinks Swift is all simplicity and scripty loveliness I came >> across this StackOverflow question and answer today. It will be a while >> before I entirely understand i

Re: Advise on referencing NSDocument from custom view

2014-08-10 Thread Quincey Morris
On Aug 10, 2014, at 09:01 , Luc Van Bogaert wrote: > I was thinking of using a weak property for my custom view to reference the > document and set this property from the same windowDidLoad: method, but I'm > not sure if this is a good approach to take. Any advise on this? It’s not a bad appro

Re: Bindings in Swift

2014-08-10 Thread Charles Srstka
On Aug 9, 2014, at 8:44 PM, Quincey Morris wrote: > On Aug 9, 2014, at 18:13 , Roland King wrote: > >> If this is where we are then it would be handy to have the runtime throw, or >> at least log, if you attempt to KVO a Swift property which isn't dynamic. > > Yes, though I expect (hope?) th

Re: Bindings in Swift

2014-08-10 Thread Quincey Morris
On Aug 10, 2014, at 10:15 , Kyle Sluder wrote: >> OTOH, C++ has historically proved that generics (i.e. templates) > > I really wish people would stop referring to C++ templates as generics. Point taken, dope-slap administered. ___ Cocoa-dev mailing

Re: True Type Fonts

2014-08-10 Thread Fritz Anderson
On Aug 9, 2014, at 10:11 PM, Raglan T. Tiger wrote: > I will find out about the licensing issue, but we are not changing or making > a derivative. Just to be clear: Preparing a derivative font is _one_ way to breach the license, but not the only, or even the primary, way. The core issue is tha

Re: Advise on referencing NSDocument from custom view

2014-08-10 Thread Luc Van Bogaert
On 10 Aug 2014, at 19:15, Quincey Morris wrote: > On Aug 10, 2014, at 09:01 , Luc Van Bogaert wrote: > >> I was thinking of using a weak property for my custom view to reference the >> document and set this property from the same windowDidLoad: method, but I'm >> not sure if this is a good

Re: True Type Fonts

2014-08-10 Thread Raglan T. Tiger
On Aug 10, 2014, at 2:14 PM, Fritz Anderson wrote: > And I’d be surprised if your digitizer didn’t adjust the outlines to fit the > unique medium of embroidery, making its output a derivative work. Interesting point, I will broach this topic with management. BTW, the technical solutions proff

Re: True Type Fonts

2014-08-10 Thread Jens Alfke
> On Aug 10, 2014, at 1:14 PM, Fritz Anderson wrote: > > That’s a rendering. And I’d be surprised if your digitizer didn’t adjust the > outlines to fit the unique medium of embroidery, making its output a > derivative work. I don't think that adjustment would be a problem. There are lots of g

NSTableRowView appearance when group rows float

2014-08-10 Thread Bill Cheeseman
The OS X reference document for NSTableRowView says this about the "floating" property: "Floating is a temporary attribute that is set when a particular group row is actually floating above other rows. The state may change dynamically based on the position of the group row. Drawing may be differ

Re: Advise on referencing NSDocument from custom view

2014-08-10 Thread Quincey Morris
On Aug 10, 2014, at 13:16 , Luc Van Bogaert wrote: > Let's see if I understand this correctly: do you mean I could create a > separate model class, eg. "Drawing" with all of it's properties and reference > this in my document class as an instance variable or even as a property. > Then, from my

Re: NSTableRowView appearance when group rows float

2014-08-10 Thread Ken Thomases
On Aug 10, 2014, at 3:54 PM, Bill Cheeseman wrote: > My application has a source list using a view-based NSOutlineView. My code > does nothing to dictate the initial or subsequent appearance of the group > rows other than to implement the -outlineView:isGroupRow: delegate method to > identify

Re: Bindings in Swift

2014-08-10 Thread Roland King
>> Deliberately missing your point, I’d say the problem is that Swift has two >> kinds of generics — one for class types and one for protocols. The concepts >> are fairly easy to grasp individually, but become horrendously complex when >> allowed to interact. Personally, I regard this as a bug

Re: Bindings in Swift

2014-08-10 Thread Quincey Morris
On Aug 10, 2014, at 14:39 , Roland King wrote: > I haven't yet understood why there are two different syntaxes for > class/function generics, with the syntax but protocols are unadorned > but have associated types. Naively I would have expected both to look the > same, with parameters in angl

Re: True Type Fonts

2014-08-10 Thread Raglan T. Tiger
> but my reading is that for a customer of your app to extract the outlines and > send them as part of a vector file to some sort of printer (like an > embroidery machine or a laser-cutter) is fine. But for your app itself to > include copies of font outlines would not be OK. This is more in k

Re: Obtaining baseline from CATextLayer

2014-08-10 Thread Graham Cox
On 11 Aug 2014, at 3:10 am, Kyle Sluder wrote: > CATextLayer is pretty much useless. You’re far better off rendering the text > yourself using Quartz. > > Do it in -displayLayer, not -drawLayer:inContext:, because you want to create > the backing store yourself to get correct subpixel antiali