[SOLVED] NSImageView setAnimates:YES... PLEASE?
[SOLVED] NSImageView setAnimates:YES... PLEASE?
- Subject: [SOLVED] NSImageView setAnimates:YES... PLEASE?
- From: John Turnipseed <email@hidden>
- Date: Thu, 3 May 2007 13:52:52 -0500
Okay, figured it out...
My design folks had created the animated GIF I was using for testing
using the Photoshop CS3, which apparently defaults to no delay for
each image in the set.
Web browsers must use a default delay in this case to animate the
image. NSImageView does not do this. If there is no delay specified
for each frame, it doesn't animate at all.
-=- John
________________________________________________________________________
_____
John Turnipseed | "The most likely way for the world to be
destroyed,
Mac Driver/Programmer | most experts agree, is by accident. That's
where
email@hidden | we come in; we're computer professionals.
email@hidden | We cause accidents." -- Nathaniel Borenstein
On May 2, 2007, at 08:12:11 PM, John Turnipseed wrote:
Okay, so I did some more digging and apparently it may just be the
particular animated GIF file I was doing my testing with. The
strange thing is it animates just fine in when loaded in a Safari
window, but NSImageView doesn't like it at all.
-=- John
______________________________________________________________________
_______
John Turnipseed | "The most likely way for the world to be
destroyed,
Mac Driver/Programmer | most experts agree, is by accident.
That's where
email@hidden | we come in; we're computer professionals.
email@hidden | We cause accidents." -- Nathaniel Borenstein
On May 1, 2007, at 05:50:10 PM, Ricky Sharp wrote:
On May 1, 2007, at 3:42 PM, John Turnipseed wrote:
That's close to what I did as a sanity check. I created a window
in a NIB with an image view set to animate, built and ran the
application and then dragged an animated gif image file onto the
image. It still didn't animate. Just displayed the first frame.
I'm actually trying to display an animated GIF in a
programmatically created NSWindow and NSImageView, no NIB files
directly involved at all.
I just did another test. While I still used a NIB containing a
window (which also has the original image view), I did
programatically build a second image view and added it to the window:
NSImageView* theImageView = [[[NSImageView alloc]
initWithFrame:NSMakeRect (20, 20, 249, 106)] autorelease];
[theImageView setEditable:YES];
[theImageView setImageFrameStyle:NSImageFrameGrayBezel];
[theImageView setAnimates:YES];
[[theWindow contentView] addSubview:theImageView];
At runtime, I'm able to drag in different animated GIFs into each
of the image views and they animate without any issues.
What specifically is your code when building the window and adding
the image view?
I wouldn't think it matters, but I'm building/running on a G5
tower on 10.4.9 and building using the 10.4 Universal SDK.
Haven't tried it on my intel machine yet.
That shouldn't make any difference. I'm also using a G5 on that
OS and building against the 10.4u SDK.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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