문제

I would like to receive the changeFont: and changeColor: messages in a WebView subclass.

According to the documentation, these methods are sent by NSFontManager and NSColorPanel respectively to responders.

Yet, they never get called in my WebView subclass. Is this the expected behavior? If not, what am I doing wrong?

도움이 되었습니까?

해결책

Apparently because the WebView had editable content the events were being consumed by a child responder.

The workaround was to listen to WebViewDidChangeNotification when this happens.

다른 팁

Here is what I think is occurring

NSFontManager apparently sends the messages along the responder chain and not to the delegate.

I would set my CustomWebViewController to be the delegate of the window.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top