I have a Content View that I use in my preferences nib.
I use a method to change the font of a NSTextView in my app.
This Content View has to be set as firstResponder to get messages from my changeTextFont: method, but since it’s not a window it doesn’t have a firstResponder. As a result, it does not change the text font at all… does anyone have a workaround for this ?
Thanks a bunch guys.
I could make the sample project work without specifying
[self window]as first responder. What I did was:in
(void)changeTextFont:(id)sender, I replaced the statement:with lines:
I renamed
changeFont:tochangeMyFont::With these changes, the font is correctly updated in the example content view.
I don’t know if it will work for you, because in the end you are trying to use this code in a different context, but I hope that it will. I would suggest you to first try and modify the sample project so that you can get confident with my solution and then move it to your project to check whether it also works there.