Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)
Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)
- Subject: Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)
- From: Gabriel Zachmann <email@hidden>
- Date: Mon, 5 Oct 2009 18:24:53 +0200
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 you assumed the same view was being used and resized, but that
would be easy to test to verify your assumption.
Yes, I stand corrected.
On the other hand, I think, testing assumptions about an API is not
The Right Way, because
1. you can never be certain whether you have tested all of your
(possibly subconscious) assumptions; and,
2. if it's not written in the doc, an assumption might always become
invalid, no matter how often you tested it, because the developers of
the framework can always change their minds.
Granted, in my case it probably won't hurt, if the developers change
their minds and in the future decide to *not* instantiate
ScreenSaverView multiple times on the same display, provided my code
is "multiple-instance-safe" ....
Here's another one (newly introduced) that isn't in the docs (as far
as I know): to run on Snow Leopard on a machine whose processor is
capable of running in 64-bit mode (all currently shipping Macs), you
will need a 64-bit version of your screen saver with GC supported.
Thank you so much for pointing out this one to me!
Do I need to change anything in my code for that?
To run on Leopard and earlier, as well as on Snow Leopard on
machines whose processor is not capable of running in 64-bit mode
(Core Solo, Core Duo), you will need a 32-bit version of your screen
saver with GC off.
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 ?
Best regards,
Gabriel.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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