Error: unlockFocus causes too much time

I am a relative newbie to cocoa and am creating a Mac OS X application. My application (SDK 10.8 + Deployment 10.6) works fine on OSX 10.8 (actually on multiple computers), but on an earlier 10.6 it crashes. After checking the logs using the tools, I get the following error:

"unlockFocus causes too much time

After several runs, I realized that this is because of some cocoa drawings that I make. I have no idea why this is. Is it due to hardware or OS limitations? I read the Apple documentation but found nothing.

I know that each situation is different, but is there a common reason for this? What does โ€œtoo much timeโ€ mean? Limit for a specific time?

+4
source share
1 answer

I also had this problem and solved it by removing the call to [[NSColor blackColor] redComponent] (some instances of NSColor do not support this property).

0
source

Source: https://habr.com/ru/post/1489464/


All Articles