• 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: ScreenSaverView gets instantiated several times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ScreenSaverView gets instantiated several times


  • Subject: Re: ScreenSaverView gets instantiated several times
  • From: Roland King <email@hidden>
  • Date: Mon, 05 Oct 2009 18:06:52 +0800

Yes, I do.
In particular, because it has a major impact on the way one has to design the code.


For instance, if changing the configuration causes some longish computations.
I tried pretty hard to hide this from the user, so that after applying the changes of the configuration of my screen saver, the user does not have to wait for tens of seconds until the screen saver resumes operation.


Now, the design I chose to achieve this is useless, because when the user clicks 'Test', System Preferences just goes ahead and creates a new instance!
Now, it seems that I have no other choice than keep up the modal panel until the computations ensuing the config chance are finished ;-(



Well it's not necessarily useless, you just need to put it elsewhere. What were you doing (or trying to do) before when the user changed configuration? Were you displaying the 'last version' whilst calculating things in the background and then switching to the new version .. which would be a bit confusing. Or are you saying the first time the screen saver is used you do a bunch of complicated calculations which are slow but the results of which you cache in the instance of your screen saver class and when you change the config a bit you can recalculate the new values quite rapidly? If it's the latter, you could store the 'basic' calculations in static variables in your class, calculate them once and then have every instance of the screen saver use them.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)
      • From: Gabriel Zachmann <email@hidden>
References: 
 >ScreenSaverView gets instantiated several times (From: Gabriel Zachmann <email@hidden>)
 >Re: ScreenSaverView gets instantiated several times (From: Michael Babin <email@hidden>)
 >Re: ScreenSaverView gets instantiated several times (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: Re: Keeping NSWindow below all other windows
  • Next by Date: grouping undo across method calls in CoreData
  • Previous by thread: Re: ScreenSaverView gets instantiated several times
  • Next by thread: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)
  • Index(es):
    • Date
    • Thread