Re: NSString drawAtPoint in Mojave

2018-12-14 Thread Matt Jacobson
Hi,

> On Dec 13, 2018, at 3:27 PM, Tom Doan  wrote:
> 
> ITOT that the problem was that I had a call to lockFocusIfCanDraw 
> in my drawRect handler (from who knows what prior incarnation of 
> the OS) which, according to the documentation is deprecated and 
> "does nothing and should not be called”.

I’m glad you figured out the problem.

One small thing to point out: “does nothing and should never be called” is in 
the documentation for -lockFocusIfCanDrawInContext: 
.
  The comment is indeed correct.  It does not and has never done anything on 
Mac OS X.

You were probably calling -lockFocusIfCanDraw 
,
 which does not say that.

Hope that clarifies things a bit,

Matt
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSString drawAtPoint in Mojave

2018-12-13 Thread Tom Doan
ITOT that the problem was that I had a call to lockFocusIfCanDraw 
in my drawRect handler (from who knows what prior incarnation of 
the OS) which, according to the documentation is deprecated and 
"does nothing and should not be called". The second half of that is 
probably correct, the first half isn't. In the 10.14 SDK, it changed the 
[NSGraphicsContext currentContext] so my text was apparently 
being drawn to nowheresville. Works fine with the 10.13 SDK.


> I just started testing a port of my application to Mojave. I'm having
> a rather odd problem with NSString drawAtPoint withAttributes. I use
> that to add text to graph windows. All the lines and fills look fine,
> but the text, done with drawAtPoint, doesn't show on the screen.
> However, if I take the window and create a PDF from it, everything
> looks fine. It also works fine on High Sierra. Anybody have any idea
> what might be going wrong with this?
> 
> Best regards,
> 
> Tom Doan
> ---
> Estima
> 1560 Sherman Ave #1029
> Evanston, IL 60201
> USA
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/tomd%40estima.com
> 
> This email sent to t...@estima.com


---
1560 Sherman Ave #1029
Evanston, IL 60201
USA


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSString drawAtPoint in Mojave

2018-11-07 Thread Tom Doan
> On Nov 7, 2018, at 11:40 AM, Tom Doan  wrote:
> > 
> >> Does the "Layer-Backed Views" section of the AppKit Release Notes
> >> for 10.14 explain what you're seeing?
> >>  >> s_m
> >> ojave_10_14_release_notes/appkit_release_notes_for_macos_10_14#3014
> >> 921
> >>> 
> > 
> > I'm not really sure how. As I said, any non-text information seems
> > to be drawn correctly. Why would only the text not get drawn
> > properly?
> 
> Well, are those all drawn in the same view?  Are you perhaps using
> -setNeedsDisplayInRect: with rects for the non-text stuff and
> accidentally relying on an enclosing/overlapping/underlapping view's
> redraw to force the drawing of the text?
> 
I do setNeedsDisplay for the whole view.

> Regards,
> Ken
> 


---
1560 Sherman Ave #1029
Evanston, IL 60201
USA


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSString drawAtPoint in Mojave

2018-11-07 Thread Ken Thomases
On Nov 7, 2018, at 11:40 AM, Tom Doan  wrote:
> 
>> Does the "Layer-Backed Views" section of the AppKit Release Notes for
>> 10.14 explain what you're seeing?
>> > ojave_10_14_release_notes/appkit_release_notes_for_macos_10_14#3014921
>>> 
> 
> I'm not really sure how. As I said, any non-text information seems to 
> be drawn correctly. Why would only the text not get drawn 
> properly?

Well, are those all drawn in the same view?  Are you perhaps using 
-setNeedsDisplayInRect: with rects for the non-text stuff and accidentally 
relying on an enclosing/overlapping/underlapping view's redraw to force the 
drawing of the text?

Regards,
Ken

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSString drawAtPoint in Mojave

2018-11-07 Thread Tom Doan
> > 
> > I just started testing a port of my application to Mojave. I'm
> > having a rather odd problem with NSString drawAtPoint
> > withAttributes. I use that to add text to graph windows. All the
> > lines and fills look fine, but the text, done with drawAtPoint,
> > doesn't show on the screen. However, if I take the window and create
> > a PDF from it, everything looks fine. It also works fine on High
> > Sierra. Anybody have any idea what might be going wrong with this?
> 
> Are you just running your app on Mojave or are you also building
> against the 10.14 SDK?

I built it in XCode 10.1. I don't see an option on that to choose the 
SDK---all it shows is "Mac OSX" as the Base SDK.

  Are you able to test a version of your app
> that was built against an earlier SDK?  Does that show the same issue
> when run on Mojave?

If I run a build from before XCode 10.1, it works fine.

> Where/when are you calling -drawAtPoint:withAttributes:?  Is it within
> a view's -drawRect: method?  Or are you trying to draw at some other
> time?

Yes, in the drawRect.
 
> Does the "Layer-Backed Views" section of the AppKit Release Notes for
> 10.14 explain what you're seeing?
>  ojave_10_14_release_notes/appkit_release_notes_for_macos_10_14#3014921
> >

I'm not really sure how. As I said, any non-text information seems to 
be drawn correctly. Why would only the text not get drawn 
properly?

> Regards,
> Ken
> 


---
1560 Sherman Ave #1029
Evanston, IL 60201
USA


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSString drawAtPoint in Mojave

2018-11-06 Thread Ken Thomases
On Nov 6, 2018, at 11:51 PM, Tom Doan  wrote:
> 
> I just started testing a port of my application to Mojave. I'm having a 
> rather odd problem with NSString drawAtPoint withAttributes. I use 
> that to add text to graph windows. All the lines and fills look fine, but 
> the text, done with drawAtPoint, doesn't show on the screen. 
> However, if I take the window and create a PDF from it, everything 
> looks fine. It also works fine on High Sierra. Anybody have any idea 
> what might be going wrong with this?

Are you just running your app on Mojave or are you also building against the 
10.14 SDK?  Are you able to test a version of your app that was built against 
an earlier SDK?  Does that show the same issue when run on Mojave?

Where/when are you calling -drawAtPoint:withAttributes:?  Is it within a view's 
-drawRect: method?  Or are you trying to draw at some other time?

Does the "Layer-Backed Views" section of the AppKit Release Notes for 10.14 
explain what you're seeing?


Regards,
Ken

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSString drawAtPoint in Mojave

2018-11-06 Thread Tom Doan
I just started testing a port of my application to Mojave. I'm having a 
rather odd problem with NSString drawAtPoint withAttributes. I use 
that to add text to graph windows. All the lines and fills look fine, but 
the text, done with drawAtPoint, doesn't show on the screen. 
However, if I take the window and create a PDF from it, everything 
looks fine. It also works fine on High Sierra. Anybody have any idea 
what might be going wrong with this?

Best regards,

Tom Doan
---
Estima
1560 Sherman Ave #1029
Evanston, IL 60201
USA


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com