Re: Binding to an ImageView and EXC_BAD_ACCESS
Re: Binding to an ImageView and EXC_BAD_ACCESS
- Subject: Re: Binding to an ImageView and EXC_BAD_ACCESS
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 15 Mar 2004 21:40:24 -0800
On Mar 15, 2004, at 9:11 PM, Tod Cunningham wrote:
I bound an NSImageView to a valuePath and when that path doesn't point
to a valid image the application throws an EXC_BAD_ACCESS exception.
Seeing how this exception occurs in the bowels of NSObjectController,
how should this case be handled (other then load the image manually
and bind to a different method).
I would suggest loading the image manually and bind 'data' to a
different method.
The "different method" could try to load the image; if it succeeds,
return the NSData object, and if it fails, return nil (or perhaps a
suitable placeholder) -- you might also log an error.
mmalc
_______________________________________________
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.