2009/5/11 Dragan Milić <mi...@mac.com>:
> On pon 11. 05. 2009., at 20:07, Douglas Davidson wrote:
>
>> On May 11, 2009, at 10:53 AM, Dragan Milić wrote:
>>
>>> Is there any way to initialise and use WebKit out of the main thread?
>>
>> No, there isn't.  This is a fundamental restriction on the use of WebKit.
>
> Yes, I know. I just hoped there was some secret magical workaround which
> would enable me to create attributed strings in the main thread. The point
> is I'm trying to create something like Finder's "Show icon preview"
> functionality, trying to create graphical representations of some text files
> (which are kept in memory) but to still keep UI responsive if a user wants
> to scroll view etc.

There's no need for secret magic. Just use
performSelectorOnMainThread: to get some code to run on the main
thread. It can then do the NSAttributedString stuff. Of course it will
block the main thread for the duration of the operation, so if your
strings take a long time to convert then this is not ideal.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to