Edit menu localisation, default application menu

2015-07-11 Thread Aandi Inston
It turns out, and I'm sure this will surprise nobody but me, that for the copy/paste/cut keyboard commands to work in Cocoa my app needs to have a suitable Edit menu with copy/paste/cut menu items and keyboard equivalents. My question is about localisation. The app is localised via its own string f

Re: Edit menu localisation, default application menu

2015-07-11 Thread Uli Kusterer
On 11 Jul 2015, at 09:39, Aandi Inston wrote: > It turns out, and I'm sure this will surprise nobody but me, that for the > copy/paste/cut keyboard commands to work in Cocoa my app needs to have a > suitable Edit menu with copy/paste/cut menu items and keyboard equivalents. > My question is about

Re: Edit menu localisation, default application menu

2015-07-11 Thread 2551
> On 11 Jul 2015, at 16:03, Uli Kusterer wrote: > > I can't find anything since they redid the web site. Sorry, OT, but boy is that frustrating. What is it with Apple and their websites (cf the mess they made of Apple Support Communities with the "overhaul" a year or two back before deciding

Re: Edit menu localisation, default application menu

2015-07-11 Thread Ulf Dunkel
> Sorry, OT, but boy is that frustrating. What is it with Apple and their > websites (cf the mess they made of Apple Support Communities with the > "overhaul" a year or two back before deciding to make a similar disaster with > the Developer site)? Come on, guys, it's not that tricky. Visit

Swift description

2015-07-11 Thread William Squires
In ObjC, I can have a class implement the description message so I can do: MyClass *myObj = [[MyClass alloc] init]; NSLog("%@", myObj); and it will be as if I did: NSString *aDesc = [myObj description]; NSLog("%@", aDesc); What's the Swift equivalent? _

Re: Swift description

2015-07-11 Thread Roland King
> On 11 Jul 2015, at 22:24, William Squires wrote: > > In ObjC, I can have a class implement the description message so I can do: > > MyClass *myObj = [[MyClass alloc] init]; > > NSLog("%@", myObj); > > and it will be as if I did: > > NSString *aDesc = [myObj description]; > NSLog("%@", aDes

RE: Edit menu localisation, default application menu

2015-07-11 Thread Lee Ann Rucker
There are some that it will translate for you - Show/Hide Toolbar, for one. If you have "Show Toolbar", it'll swap in "Hide Toolbar" for you. However! If your translation of Show doesn't match, it won't swap in the translated Hide. This is easy to fall into if your localizers don't phrase it the

Re: Edit menu localisation, default application menu

2015-07-11 Thread Gary L. Wade
> On Jul 11, 2015, at 2:03 AM, Uli Kusterer > wrote: > > In particular, use unique keys for each bit of text you localize, don't use > the English strings. Words in languages are like circles in a Venn diagram, > they overlap, but are rarely identical. Therefore, it's very easy to > mis-trans

Re: PSA: floor(NSFoundationVersionNumber) doesn't work with Yosemite or later

2015-07-11 Thread Gary L. Wade
On Jul 10, 2015, at 5:31 PM, Ben Kennedy wrote: >> Once Yosemite stops being updated, we can of course use the constant for the >> last version that’s released, but since we still can’t say with 100% >> certainty that there won’t be a 10.10.5, we can’t really rely on this. > > No kidding. (Nev

Re: Swift description

2015-07-11 Thread Jens Alfke
I think William asked how to implement a custom description, not how to print it. The method is the same (for compatibility): description(). But since Swift is stricter about typing, you have to implement the Printing (sp?) protocol, which contains just that one method, to signal that your clas

Re: Swift description

2015-07-11 Thread Quincey Morris
On Jul 11, 2015, at 11:51 , Jens Alfke wrote: > > I think William asked how to implement a custom description, not how to print > it. Roland was pointing out that Swift uses the custom description for string interpolation, which is the equivalent of using a “%@“ format string in Obj-C. That d

Re: Swift description

2015-07-11 Thread Roland King
> > However, Roland got it slightly wrong, according to the documentation. This: > > print (“\(myObj)”) > > never uses debugDescription, only description. To use debugDescription (if it > exists, or description instead): > > debugPrint (“\(myObj)”) Dunno about the documentation -