NSPopover sample code does not detach window -



NSPopover sample code does not detach window -

i have not been able nspopover detach window in own projects, simplify tried apple sample.

i downloaded fresh re-create of apple sample project: http://developer.apple.com/library/mac/samplecode/popover/introduction/intro.html

it behaves same, can't drag window detach either.

the project seems provide right windows , controllers , implements detachablewindowforpopover: delegate method. method never called.

does know secret detachable nspopovers?

found reply while typing question…

mac os x 10.10 yosemite has new delegate method:

(bool)popovershoulddetach:(nspopover *)popover

the default behavior on yosemite no (should not detach). delegates must implement method in order windows detachable. sample project not implement method, when compiled on yosemite not detach (and produces several deprecation warnings -- maybe should have taken hint needs update).

adding:

- (bool)popovershoulddetach:(nspopover *)popover { homecoming yes; }

to mywindowcontroller.m fixes problem.

window detach nspopover

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -