Re: Using other classes in ScreenSavers
Re: Using other classes in ScreenSavers
- Subject: Re: Using other classes in ScreenSavers
- From: Bob Savage <email@hidden>
- Date: Fri, 04 Jan 2002 12:01:48 -0600
on 1/4/02 4:10 AM, Angela Brett wrote:
>
I want to use one of my classes (let's call it MyClass) in the screen
>
saver, but if I put the files in the project and import the header
>
file for MyClass in the ScreenSaverView subclass's header, I get
>
runtime errors because MyClass is getting instantiated and sent the
>
initWithFrame:isPreview: method which should go to my ScreenSaverView
>
subclass. I've tried moving around the #import and a few things like
>
that in case the compiler is somehow confusing MyClass for a
>
ScreenSaver subclass, to no avail.
I may be misunderstanding you, but it sounds like when you "add" your class
to the project, you are changing the bundle's principle class. You might
want to try this with the two versions (the one where the screensaver gets
the call to initWithFrame: and the one where your class is getting it):
In PB, click on the "Targets" tab. Then click on your target. This should
cause the main window to display some stuff about your target.
In the main display click on the "Bundle Settings" tab. Look for the section
(in bold type) that says "Cocoa-Specific".
What do the different targets say for "Principal class"?
Bob