• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using other classes in ScreenSavers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Using other classes in ScreenSavers
      • From: Angela Brett <email@hidden>
References: 
 >Using other classes in ScreenSavers (From: Angela Brett <email@hidden>)

  • Prev by Date: Re: The ULTIMATE Cocoa Development Language
  • Next by Date: NSSound - pause and resume
  • Previous by thread: Using other classes in ScreenSavers
  • Next by thread: Re: Using other classes in ScreenSavers
  • Index(es):
    • Date
    • Thread