Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw from a thread.



Hej!

On 9 jun 2005, at 07.36, Tommy Nordgren wrote:

I've got a fractal drawing application written in Cocoa.
Because the main window takes a significant time to render, I wonder how I can do
to update the window from a separate Thread.
I know Carbon supports Multithreaded drawing, but what about Cocoa?
I'm using Mac OS X 10.4 Tiger.

You can draw from non-main threads, check the documentation:

<http://developer.apple.com/documentation/Cocoa/Conceptual/ Multithreading/articles/CocoaSafety.html#//apple_ref/doc/uid/ 20000736-123351-BBCFIIEB>

You might know that the animations in buttons and progress indicators on Mac OS X is driven by a thread called the "heartbeat" thread. It most likely uses this type of implementation to do it's drawing.

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >How to draw from a thread. (From: Tommy Nordgren <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.