Re: drawRect auto launch
Re: drawRect auto launch
- Subject: Re: drawRect auto launch
- From: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 25 Sep 2003 18:34:25 +0200
At 14:52 Uhr +0200 25.09.2003, Cyprien wrote:
my app draw a graph in a window. But I find out that the drawRect
method of my customview is called every time that the window becomes
active or inactive. That is, everytime that his status change. (When
I click on another app etc.)
This is intentional. The window and many controls in it change their
look when they become inactive/active, and this gives them an
opportunity to do so.
I'm wondering if it's possible that this drawRect method will be
called juste once, at the opening of the window... I don't need more
and it's slowing down my app.
You might want to look into caching your image. Draw it into an
NSImage, and then only draw this NSImage out on drawRect:.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.