Is this a bug with NSOpenPanel, it causes the interface to hang for ~1 second?
Asked Answered
V

0

6

Background

Calling -beginWithCompletionHandler: on NSOpenPanel causes the user interface to hand of about a second after the use hits the open button.

Two messages error messages are printed,

* WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.

and,

WindowServer[90]: CGXDisableUpdate: UI updates were forcibly disabled by application "OpenPanelTest" for over 1.00 seconds. Server has re-enabled them.

The solution seems to be to instead run a modal window (although this is really not a general solution!)-beginSheetModalForWindow: completionHandler:, the warning 'userSpaceScaleFactor...' is still printed the user interface no longer hangs.

My question

Is this a bug or am I doing something wrong or have the wrong Xcode settings? I do not have sandboxing enables, nor is code signing activated. This behaves the same in both plain Application and Document-based Applications. Would you recommend I submit to Apple? With Open Panels being used in almost every App I find it strange that Google finds virtually nothing on this.

Update

Example code is available on github, https://github.com/danieljfarrell/AppTest-NSOpenPanel

Venetic answered 6/2, 2013 at 4:0 Comment(4)
Does the problem occur in an app that has no other functionality (i.e. a minimal test case)?Martinic
Yes, I made a new project to test this (two projects actually; a Document-based and App-based), the source code it on github. See the update above if you are interested.Venetic
I would file a bug on Radar and let Apple deal with it.Martinic
OK, thank you for the advice. I'll do that.Venetic

© 2022 - 2024 — McMap. All rights reserved.