Re: screen dump crash with out sleep
Re: screen dump crash with out sleep
- Subject: Re: screen dump crash with out sleep
- From: Michael Watson <email@hidden>
- Date: Sat, 23 Jun 2007 01:47:56 -0400
One more further thing I forgot to mention:
[window contentView]
Every time you do this, you're sending a message to the window to get
a pointer to the content view object. The problem is that you do this
three times in a situation where it won't change; the object is
always the same, so you should do this once and reuse the pointer
instead of racking up wasted instructions. Example:
NSView *contentView = [window contentView];
[contentView lockFocus];
NSRect bRect = [contentView bounds];
rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:bRect];
[contentView unlockFocus];
--
m-s
On 23 Jun, 2007, at 01:42, Michael Watson wrote:
[[window contentView] lockFocus];
NSRect bRect = [[window contentView] bounds];
rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:bRect];
[[window contentView] unlockFocus];
_______________________________________________
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