• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField black outline, not drawing in background thread when in a custom NSControl?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField black outline, not drawing in background thread when in a custom NSControl?


  • Subject: Re: NSTextField black outline, not drawing in background thread when in a custom NSControl?
  • From: aaron smith <email@hidden>
  • Date: Mon, 21 Sep 2009 00:29:34 -0700

Hey Graham, thanks for the reply. Would you mind glancing at some code
quickly? I've been banging my head against the wall on this one.

Here's my view that builds out a search looking control (extends NSView).
http://pastebin.com/m5fd70532

and here's the code that builds the scale 9 background
http://pastebin.com/m31770882

Here's what the search control looks like (notice the black border and
the cursor are solid black). The cursor doesn't blink.
http://imgur.com/V4yti.png

I've been messing around with my code, trying to figure out where the
problem is being introduced, and it seems it's with
NSDrawNinePartImage (see line 166) - as soon as I comment out that one
line of code, the textfield behaves as expected. But obviously the
background isn't drawn.

It seems like the NSDrawNinePart image is halting a thread that draws
the the NSTextField? When I mouse over and out of the text field
really quickly (triggering the drawRect method) the NSTextField then
draws correctly because it's being called multiple times, causing the
cursor to blink etc.

Argh.
Thanks for any help





On Sun, Sep 20, 2009 at 5:24 AM, Graham Cox <email@hidden> wrote:
>
> On 20/09/2009, at 6:25 PM, aaron smith wrote:
>
>> Even when setting all those to false, I still get this 1px black border.
>
>
> It sounds like the graphics context composite mode is set incorrectly. Try
> looking into that.
>
> --Graham
>
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSTextField black outline, not drawing in background thread when in a custom NSControl? (From: aaron smith <email@hidden>)
 >Re: NSTextField black outline, not drawing in background thread when in a custom NSControl? (From: Graham Cox <email@hidden>)

  • Prev by Date: [SOLVED (but not pretty)] Running run loops in 10.6
  • Next by Date: Core Data threading fun
  • Previous by thread: Re: NSTextField black outline, not drawing in background thread when in a custom NSControl?
  • Next by thread: Subclassing NSUserDefaultsController
  • Index(es):
    • Date
    • Thread