Re: Jag Screen Savers not 10.1.x Compatible?
Re: Jag Screen Savers not 10.1.x Compatible?
- Subject: Re: Jag Screen Savers not 10.1.x Compatible?
- From: Michael Briscoe <email@hidden>
- Date: Tue, 22 Oct 2002 11:08:24 -0700
On Tuesday, October 22, 2002, at 10:44 AM, Stiphane Sudre wrote:
>
>
On Tuesday, October 22, 2002, at 07:12 PM, Michael Briscoe wrote:
>
>
> On Tuesday, October 22, 2002, at 09:35 AM, Finlay Dobbie wrote:
>
>
>
>>
>
>> On Tuesday, October 22, 2002, at 05:03 pm, Robert Cerny wrote:
>
>>
>
>>> isn't it samo basic problem like compiling with gcc 3?
>
>>
>
>> Binaries compiled with gcc3 should work on all versions of OS X. The
>
>> only problems will be if you link against libraries that don't
>
>> exist, or try to call undefined symbols, etc etc. What errors do the
>
>> 10.1 users get? Anything in the console? It's difficult to try and
>
>> figure out what's going wrong unless you provide at least some basic
>
>> > pointers.
>
>>
>
>> -- Finlay
>
>>
>
>>
>
> They report that they can view the preview, which is a simple
>
> NSImage, and play with the configuation, but when they try to "test"
>
> it the screen goes black, and they can't get out of it without a
>
> restart. When they try to activate the SS from the desktop, the
>
> screen goes black for a second, and then dumps back out to the
>
> desktop.
>
>
>
> Unfortunately I don't have any machines running 10.1.x anymore, so I
>
> can't debug on my own, I'm relying on user feedback.
>
>
>
> The screen saver in question is at:
>
> http://www.digitalfireworx.com/Cemetery/CemeterySaver.sit
>
>
Indeed it's locking the screen.
>
>
What I'm seeing in Console.app after a ssh kill on System Preference is
>
>
*** [NSURL initFileURLWithPath:] must supply a non-empty path.
>
>
The animation not being the same on the Preview and Full Screen mode,
>
the bug is surely in the Full screen code.
>
>
Here is how I am loading my assets:
// initWithFrame
- (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview
{
float zScale;
NSRect r;
NSUserDefaults *saverDefaults;
NSString *theBundlePath;
self = [super initWithFrame:frame isPreview:isPreview];
if (self) {
[self setAnimationTimeInterval:1/30.0];
thisBundle = [NSBundle bundleForClass:[self class]];
[self setPreviewMode:isPreview];
if ([self previewMode] == NO) {
monsters = [[NSMutableArray arrayWithCapacity:0] retain];
soundFX = [[NSMutableArray arrayWithCapacity:0] retain];
// Scale appropriately for screen size
r = [self bounds];
zScale = r.size.height / 768;
// Load Background Picture
[self loadBackground:zScale];
[self setCemeteryCenter];
// Awake the dead!
[self loadAssets:@"Skeleton" theFrames:5 theScale:zScale];
// ...
// Load Sounds
[self loadSound:@"Skeleton"];
// ...
} else {
theBundlePath = [thisBundle
pathForImageResource:@"Preview"];
previewImage = [[NSImage alloc]
initByReferencingFile:theBundlePath];
}
// Seed the random number generator
srandom(time(NULL));
saverDefaults = [ScreenSaverDefaults
defaultsForModuleWithName:CemSaverPrefsIdentifier];
[self reloadDefaults:[NSNotification
notificationWithName:NSUserDefaultsDidChangeNotification
object:saverDefaults]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reloadDefaults:)
name:NSUserDefaultsDidChangeNotification object:saverDefaults];
[self reloadDefaults:nil];
}
return self;
}
Here is the loadAssets code:
// loadAssets
- (void) loadAssets:(NSString *)actor theFrames:(int)frames
theScale:(float) zScale
{
int i;
NSString *nameString;
NSString *theBundlePath;
NSImage *theImage;
BOOL isNamed;
NSSize imageSize;
NSMutableArray *assetArray;
assetArray = [[NSMutableArray arrayWithCapacity:0] retain];
// Add images to array
for (i = 0; i < frames; i++)
{
nameString = [NSString stringWithFormat:@"%@ %d",actor, (i +
1)];
theBundlePath = [thisBundle pathForImageResource:nameString];
theImage = [[NSImage alloc]
initByReferencingFile:theBundlePath];
[theImage recache];
// Global Scaling
imageSize = [theImage size];
imageSize.width = imageSize.width * zScale;
imageSize.height = imageSize.height * zScale;
[theImage setScalesWhenResized:YES];
[theImage setSize:imageSize];
[theImage lockFocus];
[theImage unlockFocus];
if (i == 0) {
isNamed = [theImage setName:actor];
}
[assetArray addObject:theImage];
[theImage release];
}
[monsters addObject:assetArray];
[assetArray release];
}
_______________________________________________
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.