Re: Panel items failing to draw
Re: Panel items failing to draw
- Subject: Re: Panel items failing to draw
- From: j o a r <email@hidden>
- Date: Wed, 28 Apr 2004 21:29:50 +0200
No, you should not need to blindly hit some sort of "refresh" button in
Cocoa. Definitively not.
There must be something slightly amiss with your code.
Cocoa views and controls know how to and when to draw themselves. Some
operations on Cocoa views, like "setFrame:", does not update the views
to trigger them to redisplay, but these operations have (or should
have) comments about this in their documentation. In these cases you
need to flag them as needing display, using "setNeedsDisplay:", but
that's all that you should ever need to do - and only if you've been
using that kind of method on the view. If you just open a window with
some controls from a nib file, you shouldn't have to do anything like
that.
Try to isolate a small reproducible case and post it to the list.
j o a r
On 2004-04-28, at 21.06, Eric Long wrote:
>
In Carbon applications, it is not uncommon to need to call
>
QDFlushPortBuffer() now and then to nudge a window to draw properly.
>
I am
>
relatively new to Cocoa programming, but I am seeing a similar problem,
>
every once in awhile, where a window, such as a reasonably simple
>
dialog
>
panel, with basic UI elements like text and buttons, will appear with
>
some
>
items not drawn. In one case, I am seeing an panel's cancel and ok
>
buttons
>
come up missing, like they don't exist, until you click in a location
>
where
>
you know one of those buttons should be, then the button is suddenly
>
drawn
>
and the click handled properly.
>
>
In another case, I've seen a window with pop-ups and labels appear
>
with the
>
text labels missing.
>
>
This problem doesn't happen very often, but enough that it's not just a
>
fluke occurrence.
>
>
Do I need to call something similar to QDFlushPortBuffer() in Cocoa?
>
Or is
>
there something I may be doing wrong?
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.