• 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: ScreenSaver with a subview won't preview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ScreenSaver with a subview won't preview


  • Subject: Re: ScreenSaver with a subview won't preview
  • From: Stéphane Sudre <email@hidden>
  • Date: Tue, 12 Aug 2003 09:28:27 +0200

On mardi, ao{t 12, 2003, at 08:08 AM, Steve Milano wrote:

Are screen effects modules really the black art they seem to be sometimes?

I was messing around with some code from the book "Cocoa Programming" by Anguish, Buck, & Yacktman, and was able to adapt the "LotsOfWords" application from Appendix B to a neat screen saver, er, effects, module. LotsOfWords shows random words from a given list in random sizes and locations, and translated nicely as a screen effect. If you're curious, you can see the result here:

http://do-boy.com/downloads/vocabsaver.sit (236 K)

With a few adjustments, I was able to take the class MYWordView and set it as a subview of the ScreenSaverView. In doing so, I came across a problem that's plagued me every time I've used a subview in a screen saver: The preview doesn't show the screen saver, just a black rectangle. In this case, it turned out to be better to show a static preview anyway, as it takes a while to load the word list, but usually this is not so desirable.

So is there a way to have the preview also show the subview, as the actual screen saver does?

Sure, you usually just have to add the subview in initWithFrame:isPreview:

For example of screensavers doing this, you can have a look at the ones available here (since the source code is available):

http://s.sudre.free.fr/Software/WBSoftware.html

Most of them are adding a NSOpenGLView, SaveHollywood is adding a NSMovieView,

You can also have a look at the Alphabet Sample code on the ADC Sample code home page.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: ScreenSaver with a subview won't preview
      • From: Steve Milano <email@hidden>
References: 
 >ScreenSaver with a subview won't preview (From: Steve Milano <email@hidden>)

  • Prev by Date: ScreenSaver with a subview won't preview
  • Next by Date: Puzzling CGBitmapImageCreate problem
  • Previous by thread: ScreenSaver with a subview won't preview
  • Next by thread: Re: ScreenSaver with a subview won't preview
  • Index(es):
    • Date
    • Thread