Re: NSGraphicsContext currentContext() returns nil on OSX 10.11

2015-10-14 Thread Lakshmi P Shanmugam
Thanks for your response. Here is the use-case when this happens. Hover over a cell in a Table. Framework calls NSCell expansionFrameWithFrame:inView. And then calls NSCell cellSize. In our overridden implementation of cellSize, we try to get the graphics context using currentContext. This worked

UILabel is maiming my Character

2015-10-14 Thread Gerriet M. Denkmann
I put into some iOS 9 app (Xcode 7.0) 4 UILabels. All have Clip Subviews = off, font size 96 with a coloured background, text plain = “ฟี้กุฎุมพี”. The difference is the font: System: ok (but is too bold for my taste) Thonburi and Thonburi Light: bottom get cut off System Light: bottom gets cu

Re: Handling http:// URLs

2015-10-14 Thread Greg Weston
>> > Admittedly, I'm currently struggling to find a concrete example of why this > is useful, but I just know it is: This, I think, is one of those phrases that should give one pause when posting. > Any app(s) should be able to register URL patterns they're able to handle. If > the user take

Re: NSGraphicsContext currentContext() returns nil on OSX 10.11

2015-10-14 Thread Ken Thomases
On Oct 14, 2015, at 5:44 AM, Lakshmi P Shanmugam wrote: > Thanks for your response. You're welcome. > Hover over a cell in a Table. Framework calls NSCell > expansionFrameWithFrame:inView. And then calls NSCell cellSize. In our > overridden implementation of cellSize, we try to get the graph

Re: CGContextShowTextAtPoint

2015-10-14 Thread Raglan T. Tiger
> On Oct 13, 2015, at 4:56 PM, Graham Cox wrote: > > Converting this to use string drawing is easy enough: > > NSDictionary* attributes = @{NSFontAttributedName:sysFont}; > NSString* myText = [NSString stringWithUTF8String:txt]; // > check encoding if not UTF-8 > > [myText draw

Re: Handling http:// URLs

2015-10-14 Thread Jens Alfke
> On Oct 14, 2015, at 4:26 AM, Greg Weston wrote: > > You could contrive a use case for just about any behavior you could imagine. > Lacking the aforementioned concrete example, I can't come up with any of my > own that aren't handled at least as well by a more "normal" mechanism and it > str

Re: CGContextShowTextAtPoint

2015-10-14 Thread Jens Alfke
> On Oct 14, 2015, at 8:54 AM, Raglan T. Tiger wrote: > > I did all the above ... now my text prints upside down andI cannot get it to > size up regardless of the font size. The view is probably using flipped coordinates. Look up flipped coordinates in the Cocoa view documentation to understa

Re: More Xcode 7 inconsistency?

2015-10-14 Thread David Duncan
> On Oct 13, 2015, at 10:13 PM, Charles Srstka wrote: > >> On Oct 13, 2015, at 10:27 PM, Shane Stanley >> wrote: >> >> On 14 Oct 2015, at 1:33 PM, Graham Cox wrote: >>> >>> I’ve been passing nil forever, only now does Xcode 7 complain, presumably >>> because only now is the _Nonnull attrib

Re: UILabel is maiming my Character

2015-10-14 Thread David Duncan
> On Oct 14, 2015, at 4:02 AM, Gerriet M. Denkmann wrote: > > I put into some iOS 9 app (Xcode 7.0) 4 UILabels. > All have Clip Subviews = off, font size 96 with a coloured background, text > plain = “ฟี้กุฎุมพี”. > > The difference is the font: > > System: ok (but is too bold for my taste)

Re: UILabel is maiming my Character

2015-10-14 Thread Alex Zavatone
NSAttributedText works really nice with these. I'll send you some material on that. On Oct 14, 2015, at 7:02 AM, Gerriet M. Denkmann wrote: > I put into some iOS 9 app (Xcode 7.0) 4 UILabels. > All have Clip Subviews = off, font size 96 with a coloured background, text > plain = “ฟี้กุฎุมพี”.

Re: More Xcode 7 inconsistency?

2015-10-14 Thread Charles Srstka
> On Oct 14, 2015, at 12:02 PM, David Duncan wrote: > > The intended meaning was “the warning (about passing nil) is intended”. The > helpful followup is that it is generally encouraged to use empty containers > (@[] or @{}) over nil when there is no semantic difference, as is the case > for t

Re: CGContextShowTextAtPoint

2015-10-14 Thread Raglan T. Tiger
> On Oct 14, 2015, at 10:02 AM, Jens Alfke wrote: > > The view is probably using flipped coordinates. Look up flipped coordinates > in the Cocoa view documentation to understand what they are and how to work > around the problem. > > As for the size, have you set the size of the NSFont in ‘s

Re: CGContextShowTextAtPoint

2015-10-14 Thread Conrad Shultz
> On Oct 14, 2015, at 11:41 AM, Raglan T. Tiger wrote: > > > >> On Oct 14, 2015, at 10:02 AM, Jens Alfke wrote: >> >> The view is probably using flipped coordinates. Look up flipped coordinates >> in the Cocoa view documentation to understand what they are and how to work >> around the pro

Re: CGContextShowTextAtPoint

2015-10-14 Thread Raglan T. Tiger
> On Oct 13, 2015, at 4:42 PM, Wim Lewis wrote: > > > On Oct 13, 2015, at 3:02 PM, Raglan T. Tiger wrote: >> CGContextShowTextAtPoint (ctx, pt.x,pt.y,(const char*)txt, len ); >> >> This has printed my text UNTIL 10.11. >> >> I see that CGContextShowTextAtPoint is deprecated in 10.9 ... is it

Re: CGContextShowTextAtPoint

2015-10-14 Thread David Duncan
Ensure that the text matrix is sane (its separate from the current ctm and not stored with the graphics state). > On Oct 14, 2015, at 1:36 PM, Raglan T. Tiger wrote: > > >> On Oct 13, 2015, at 4:42 PM, Wim Lewis wrote: >> >> >> On Oct 13, 2015, at 3:02 PM, Raglan T. Tiger wrote: >>> CGConte

Re: CGContextShowTextAtPoint

2015-10-14 Thread Raglan T. Tiger
-rags > On Oct 14, 2015, at 2:37 PM, David Duncan wrote: > > Ensure that the text matrix is sane I have been doing this: CGAffineTransform t = CGAffineTransformMakeScale (1.0, -1.0); CGContextSetTextMatrix (ctx, t); changing the sx and sy just scrunches t

Re: More Xcode 7 inconsistency?

2015-10-14 Thread Shane Stanley
On 15 Oct 2015, at 4:02 AM, David Duncan wrote: > > The helpful followup is that it is generally encouraged to use empty > containers (@[] or @{}) over nil when there is no semantic difference, as is > the case for the aforementioned API. OK, but the docs still say: "The dictionary contains va

Re: More Xcode 7 inconsistency?

2015-10-14 Thread David Duncan
> On Oct 14, 2015, at 4:36 PM, Shane Stanley wrote: > > On 15 Oct 2015, at 4:02 AM, David Duncan wrote: >> >> The helpful followup is that it is generally encouraged to use empty >> containers (@[] or @{}) over nil when there is no semantic difference, as is >> the case for the aforementione

Re: More Xcode 7 inconsistency?

2015-10-14 Thread Charles Srstka
> On Oct 14, 2015, at 6:36 PM, Shane Stanley wrote: > > On 15 Oct 2015, at 4:02 AM, David Duncan > wrote: >> >> The helpful followup is that it is generally encouraged to use empty >> containers (@[] or @{}) over nil when there is no semantic difference, as is >

Re: UILabel is maiming my Character

2015-10-14 Thread Gerriet M. Denkmann
> On 15 Oct 2015, at 00:03, David Duncan wrote: > > >> On Oct 14, 2015, at 4:02 AM, Gerriet M. Denkmann >> wrote: >> >> I put into some iOS 9 app (Xcode 7.0) 4 UILabels. >> All have Clip Subviews = off, font size 96 with a coloured background, text >> plain = “ฟี้กุฎุมพี”. >> >> The diffe