Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Gabriel Zachmann
When the user clicks 'Test' in System Preferences, it just creates a new instance of your subclass of ScreenSaverView! Do you really find that fact to be shocking? 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

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Uli Kusterer
On 05.10.2009, at 10:39, Gabriel Zachmann wrote: I supposed that the screen saver manager would just call - initWithFrame: again. -init... methods are only called once on an instance, when it is alloced and inited. Calling it several times on the same instance that has already been

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Roland King
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

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Michael Babin
On Oct 5, 2009, at 3:39 AM, Gabriel Zachmann wrote: When the user clicks 'Test' in System Preferences, it just creates a new instance of your subclass of ScreenSaverView! Do you really find that fact to be shocking? Yes, I do. [snip] If only Apple would have said so in big letters at

How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Gabriel Zachmann
Thanks a lot for all the responses, and sorry for bothering you again with this. The problem I'm having is the following: is there an elegant way to prevent the user from clicking the 'Test' button in the Screen Savers panel in System Preferences? The reason why I'm asking: when the user

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Jack Carbaugh
Why not just fake it ... in other words ... since it's a test, just supply some generic data for the screen saver to display. Then, when they truly activate it, you provide the real data. Seems that's what others have done, that i've experienced. Not knowing for sure or not, but i believe

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Michael Babin
On Oct 5, 2009, at 10:45 AM, Gabriel Zachmann wrote: The problem I'm having is the following: is there an elegant way to prevent the user from clicking the 'Test' button in the Screen Savers panel in System Preferences? The reason why I'm asking: when the user changes the configuration

Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Gabriel Zachmann
As Uli pointed out previously, calling -initWithFrame: (or any init method) multiple times on one object is not a pattern you find in other classes/frameworks. You might have assumed a call to -setFrame:, Sorry, that was what I meant, of course (setFrameSize is the name, I think). if

Re: Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread David Duncan
On Oct 5, 2009, at 9:24 AM, Gabriel Zachmann wrote: So, is there any way to compile the screen saver into *one* bundle (or exec) such that it runs under SL with 64-bit proc's *and* 10.5/ Intel ? You need to build a universal binary (the default Xcode universal config of PPC/i386/x86_64

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Paul M
This is a much better approach IMO. If your user is trying out a bunch of options to find a particular combination that works for them, and the machine goes away for ~30 secs each time they test a new change, the'll get pretty irriated with your screen saver pretty quickly. Showing the

ScreenSaverView gets instantiated several times

2009-10-04 Thread Gabriel Zachmann
I've been hunting a bug in my screen saver for several hours, until I've found out the following shocking fact (I think). When the user clicks 'Test' in System Preferences, it just creates a new instance of your subclass of ScreenSaverView! (This can have a major impact on your system

Re: ScreenSaverView gets instantiated several times

2009-10-04 Thread Michael Babin
On Oct 4, 2009, at 7:14 PM, Gabriel Zachmann wrote: I've been hunting a bug in my screen saver for several hours, until I've found out the following shocking fact (I think). When the user clicks 'Test' in System Preferences, it just creates a new instance of your subclass of