NSImageView subclass, setImage, and bindings
NSImageView subclass, setImage, and bindings
- Subject: NSImageView subclass, setImage, and bindings
- From: Greg Best <email@hidden>
- Date: Fri, 3 Feb 2006 02:34:05 -0800
Hey--
I've been struggling with this for a while. I looked around for an
answer and it looks like someone had the same problem 2 years ago,
but I couldn't find the solution.
I've subclassed NSImageView (creating MediaWell) with the goal of
being able to receive QuickTime Movies by drag and drop. For now,
I'm only attempting to display the poster frame as the image.
-(void)setMovie:(QTMovie*)newMovie
{
[movie autorelease];
movie=[newMovie retain];
if(movie)
{
[super setImage:[movie posterImage]];
}
}
This works fine within the MediaWell object-- the poster frame shows
as the image in the NSImageView subclass. The problem is that the
binding isn't being triggered so the image is not being propogated to
the model and other views. I've tried calling setImage on super and
self with no difference in behavior (not that I'd expect any since I
haven't overridden the method).
I've also rolled the MediaWell class into a framework, and added it
to a palette so I can expose the movie itself through a binding. I
don't think this is interfering though because if I drop a jpg file
on the MediaWell, the image does propogate through the bindings.
I could probably get around this by creating an NSView subclass and
duplicating the other functionality that I need, but that seems like
a lot of trouble to go through for something that should be
straightforward.
Anyone have any experience with this?
Thanks--
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden