First of all: be sure to include ScreenSaver.framework in your project; it provides the required ScreenSaverView and ScreenSaverDefaults classes.
You say that you already have a file called ScreenSaverView.m . A couple that you also say that you need to export your -hasConfigureSheet method to disable the "Screen Saver Settings ..." function. This makes me wonder if you have subclasses of ScreenSaverView , as you should have done. (Instead, did you use a subclass of NSObject ?) ScreenSaverView export methods for you, such as -hasConfigureSheet . You must subclass it and override the appropriate methods in it.
A couple more things:
You had to include in the xib project a file containing the user interface for your configuration sheet, and you had to provide an IBOutlet in the interface of your subclass to link to the panel and the interface elements that it contains (those for which you actually need an exit, i.e).
Finally, your -configureSheet method should get a configuration sheet similar to this (in this example, configSheet will be one of your IBOutlet s):
if (configSheet == nil) { if ([NSBundle loadNibNamed:@"myConfigSheet" owner:self] == NO) { NSLog(@"load config sheet failed"); } }
Edit:
Sorry in advance if I am going to tell you what you already know, but you said that you had difficulties in configSheet , and therefore I just close all the databases.
In My_ScreensaverView.h declare a socket for your panel:
IBOutlet id configSheet;
Note that I used id instead of NSWindow * or NSPanel * , simply because I donβt know which class you are using for the sheet. (Ideally, the sheet should use NSPanel.)
In the nib file, verify that File Owner is an instance of My_ScreensaverView . You can determine this by selecting the icon for this object, and then using the Identity Inspector to specify the class.
Make a connection between the configSheet connector and the panel. One way to do this is to hold down the Control key while dragging and dropping from the File Owner object onto the window or panel icon, and then select configSheet from the popup that appears.
As always, good luck with your endeavors.