FROM : Michael Ash
DATE : Fri Jun 30 18:39:01 2006
On 6/29/06, Angelo Chen <<email_removed>> wrote:
> Hi,
>
> i set a NSCustomView in IB, then set it's custom class
> to NSQuickDrawView and linked it to a outlet called
> view, I'd like to draw a red background on it, i tried
> the following code, but does not work, what I miss
> here? thanks.
>
> [[NSColor redColor] set];
> NSRectFill([view bounds]);
> [view display];
It sounds like you don't know what an NSQuickDrawView is. It's for
embedding QuickDraw, Carbon's deprecated drawing technology brought
over from the classic Mac OS, in the Cocoa view system. If you aren't
using QuickDraw then you have no reason to use this view.
If you *do* need to use this view, then you need to actually use
QuickDraw to draw in it, rather than Cocoa drawing. How to fill a view
with red using QuickDraw is beyond the scope of this list.
Mike
DATE : Fri Jun 30 18:39:01 2006
On 6/29/06, Angelo Chen <<email_removed>> wrote:
> Hi,
>
> i set a NSCustomView in IB, then set it's custom class
> to NSQuickDrawView and linked it to a outlet called
> view, I'd like to draw a red background on it, i tried
> the following code, but does not work, what I miss
> here? thanks.
>
> [[NSColor redColor] set];
> NSRectFill([view bounds]);
> [view display];
It sounds like you don't know what an NSQuickDrawView is. It's for
embedding QuickDraw, Carbon's deprecated drawing technology brought
over from the classic Mac OS, in the Cocoa view system. If you aren't
using QuickDraw then you have no reason to use this view.
If you *do* need to use this view, then you need to actually use
QuickDraw to draw in it, rather than Cocoa drawing. How to fill a view
with red using QuickDraw is beyond the scope of this list.
Mike
| Related mails | Author | Date |
|---|---|---|
| Angelo Chen | Jun 30, 04:09 | |
| Michael Ash | Jun 30, 18:39 |






Cocoa mail archive

