Why is translatesAutoresizingMaskIntoConstraints on in my storyboard?

2013-08-19 Thread Rick Mann
I don't turn this on explicitly. But when I load a UIVieController into a view controller container, I'm getting bitching about unsatisfiable constraints, including NSAutoresizingMaskLayoutConstraint. But it's all from the same storyboard that uses autolayout. Why are there any autoresizing

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 06:41, Marcel Weiher marcel.wei...@gmail.com wrote: My problem is: ... some drawing here ... seems to assume a locked NSImage in place. It looks like: NSUInteger graphicIndex = [graphics count]; while (graphicIndex-- 0) {

Re: How to detect a Retina Mac

2013-08-19 Thread Simone Tellini
Il giorno 19/ago/2013, alle ore 09:01, Gerriet M. Denkmann gerr...@mdenkmann.de ha scritto: On 19 Aug 2013, at 06:41, Marcel Weiher marcel.wei...@gmail.com wrote: [...] I also tried (before [image lockFocus]: NSGraphicsContext *bitmapContext = [ NSGraphicsContext

Re: How to detect a Retina Mac

2013-08-19 Thread Lee Ann Rucker
I seem to need a way to tell NSImage NOT to double the pixels for me, but I don't see any way to do this. Have you tried my sample code? This part seems to be what you're looking for: NSBitmapImageRep *bmpImageRep = [NSBitmapImageRep imageRepWith32bitBuffer:NULL

Re: How to detect a Retina Mac

2013-08-19 Thread Graham Cox
On 19/08/2013, at 9:01 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I seem to need a way to tell NSImage NOT to double the pixels for me, but I don't see any way to do this. Like: [ image setBackingScaleFactor: 1 ] but no such method seems to exist. So hardcoding the retina-ness

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 14:17, Lee Ann Rucker lruc...@vmware.com wrote: I seem to need a way to tell NSImage NOT to double the pixels for me, but I don't see any way to do this. Have you tried my sample code? This part seems to be what you're looking for: NSBitmapImageRep *bmpImageRep =

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 14:17, Graham Cox appt...@me.com wrote: On 19/08/2013, at 9:01 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I seem to need a way to tell NSImage NOT to double the pixels for me, but I don't see any way to do this. Like: [ image setBackingScaleFactor: 1 ] but no

Re: How to detect a Retina Mac

2013-08-19 Thread Graham Cox
On 19/08/2013, at 12:05 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Here is the final code (if there is anything wrong or not quite right, please feel free to critizise it): [NSGraphicsContext setCurrentContext: bitmapContext2 ]; You might want to save and restore the

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 17:35, Graham Cox graham@bigpond.com wrote: On 19/08/2013, at 12:05 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Here is the final code (if there is anything wrong or not quite right, please feel free to critizise it): [NSGraphicsContext

Re: How to detect a Retina Mac

2013-08-19 Thread Graham Cox
On 19/08/2013, at 12:56 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSGraphicsContext *originalContext = [NSGraphicsContext currentContext]; ... do stuff ... [NSGraphicsContext setCurrentContext: originalContext ]; or more simply: [NSGraphicsContext

Re: How to detect a Retina Mac

2013-08-19 Thread Alex Zavatone
Sent from my iPad On Aug 18, 2013, at 11:16 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: But I do not understand it. CIImage, CGImage, NSImage I know it's not much, but CI = Core Image, CG = Core Graphics and NS = Next Step (Mac). UI Image would be for iOS, if I'm not mistaken.

Re: Why is translatesAutoresizingMaskIntoConstraints on in my storyboard?

2013-08-19 Thread Kyle Sluder
On Aug 19, 2013, at 2:48 AM, Rick Mann rm...@latencyzero.com wrote: I don't turn this on explicitly. But when I load a UIVieController into a view controller container, I'm getting bitching about unsatisfiable constraints, including NSAutoresizingMaskLayoutConstraint. But it's all from the

Re: Is it OK to setKeyEquivalent during validateMenuItem

2013-08-19 Thread Steve Mills
On Aug 16, 2013, at 15:32:01, Jerry Krinock je...@ieee.org wrote: To answer the question in your subject line, I'm not sure. It certainly seems like a misuse if not an abuse. I always do stuff like that in my friend, -menuNeedsUpdate. In -menuNeedsUpdate, you can go so far as to remove

Menu item keys stealing events from Save dlog

2013-08-19 Thread Steve Mills
Some of our tools use the arrow keys for various functions. There are modified and non-modified arrow key functions. So the user can easily find which key does which function, they commands are presented in a menu with their key equivs. This is a problem when we bring up a Save dialog. The menu

IB autolayout is impossible

2013-08-19 Thread Rick Mann
I want to create a view with size 74 x 74, containing three subviews, all centered on it. But IB is just a game of whack-a-mole. So angry. -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: IB autolayout is impossible

2013-08-19 Thread Alex Kac
IB 4.x is astoundingly hard to work with auto layout. A newer IB that shall not be named is supposedly better… On Aug 19, 2013, at 4:40 PM, Rick Mann rm...@latencyzero.com wrote: I want to create a view with size 74 x 74, containing three subviews, all centered on it. But IB is just a game

Re: IB autolayout is impossible

2013-08-19 Thread Rick Mann
On Aug 19, 2013, at 15:57 , Alex Kac a...@webis.net wrote: IB 4.x is astoundingly hard to work with auto layout. A newer IB that shall not be named is supposedly better… Yeah, too bad that's completely useless to those of use who have to ship stuff today. -- Rick

Re: IB autolayout is impossible

2013-08-19 Thread dangerwillrobinsondanger
In general in 4.x add your constraints that will make a satisfiable layout, then remove the ones you don't want. The next one does less trying without asking but this one is not that bad if people follow the flow: add yours, remove theirs. Sent from my iPhone On 2013/08/20, at 7:40, Rick

Re: IB autolayout is impossible

2013-08-19 Thread Rick Mann
On Aug 19, 2013, at 16:48 , dangerwillrobinsondan...@gmail.com wrote: In general in 4.x add your constraints that will make a satisfiable layout, then remove the ones you don't want. The next one does less trying without asking but this one is not that bad if people follow the flow: add

Re: IB autolayout is impossible

2013-08-19 Thread Kevin Muldoon
For small elements, I have to agree. Programmatically creating NSLayoutConstraints is the only way to go, IMHO. Sent from my iPhone On Aug 19, 2013, at 7:49 PM, Rick Mann rm...@latencyzero.com wrote: On Aug 19, 2013, at 16:48 , dangerwillrobinsondan...@gmail.com wrote: In general in 4.x

Drawing after CGContextClosePath() still appends line

2013-08-19 Thread Rick Mann
I'm drawing a couple of arcs and then calling ClosePath() to close up the shape I drew. This works great. But then I repeat the process in a different place, and stroke the whole thing. Unfortunately, Core Graphics adds a line from the last point in the closed path to the first point of the new

Re: Drawing after CGContextClosePath() still appends line

2013-08-19 Thread Roland King
On 20 Aug, 2013, at 8:03 AM, Rick Mann rm...@latencyzero.com wrote: I'm drawing a couple of arcs and then calling ClosePath() to close up the shape I drew. This works great. But then I repeat the process in a different place, and stroke the whole thing. Unfortunately, Core Graphics adds a

Re: Drawing after CGContextClosePath() still appends line

2013-08-19 Thread Rick Mann
On Aug 19, 2013, at 17:25 , Roland King r...@rols.org wrote: On 20 Aug, 2013, at 8:03 AM, Rick Mann rm...@latencyzero.com wrote: I'm drawing a couple of arcs and then calling ClosePath() to close up the shape I drew. This works great. But then I repeat the process in a different place,

Re: Drawing after CGContextClosePath() still appends line

2013-08-19 Thread Roland King
On 20 Aug, 2013, at 8:36 AM, Rick Mann rm...@latencyzero.com wrote: On Aug 19, 2013, at 17:25 , Roland King r...@rols.org wrote: On 20 Aug, 2013, at 8:03 AM, Rick Mann rm...@latencyzero.com wrote: I'm drawing a couple of arcs and then calling ClosePath() to close up the shape I

Re: Drawing after CGContextClosePath() still appends line

2013-08-19 Thread Ken Thomases
On Aug 19, 2013, at 7:36 PM, Rick Mann wrote: On Aug 19, 2013, at 17:25 , Roland King r...@rols.org wrote: On 20 Aug, 2013, at 8:03 AM, Rick Mann rm...@latencyzero.com wrote: I'm drawing a couple of arcs and then calling ClosePath() to close up the shape I drew. This works great. But

Re: Drawing after CGContextClosePath() still appends line

2013-08-19 Thread Rick Mann
On Aug 19, 2013, at 17:47 , Ken Thomases k...@codeweavers.com wrote: On Aug 19, 2013, at 7:36 PM, Rick Mann wrote: On Aug 19, 2013, at 17:25 , Roland King r...@rols.org wrote: On 20 Aug, 2013, at 8:03 AM, Rick Mann rm...@latencyzero.com wrote: I'm drawing a couple of arcs and then

CoreText NSMutableParagraphStyle maximumLineHeight

2013-08-19 Thread Peter C
Hi, I am attempting to create text control something similar like MS Word line spacing feature. A user complain my App paragraph text lines space is too much, this is because it is done by using NSString drawInRect:withAttributes:, not much of any adjustment. CoreText seems to able to do so by

Re: CoreText NSMutableParagraphStyle maximumLineHeight

2013-08-19 Thread Graham Cox
On 20/08/2013, at 6:08 AM, Peter C peterchan...@gmail.com wrote: A user complain my App paragraph text lines space is too much, this is because it is done by using NSString drawInRect:withAttributes:, not much of any adjustment. That's not the case. The -attributes: parameter is a