[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -setTarget: and -setAction: of NSImageView

From: Alexander Malmberg
Subject: Re: -setTarget: and -setAction: of NSImageView
Date: Mon, 22 Dec 2003 21:03:06 +0100

Kazunobu Kuriyama wrote:
> Hi,
> Because NSImageView is a subclass of NSControl, I though it accepts
> -setAction: and -setTarget: methods.
> On the other hand, the current implementation of NSImageView exploits
> NSImageCell, a subclass of NSCell. By the specification of NSCell,
> -setAction: and -setTarget must raise the exception
> NSInternalInconsistencyException.
> Therefore, contrary to my expectation (as well as everybody's, I hope),
> NSImageView doesn't accept both of two methods.

The current behavior is consistent with the documentation, and since an
NSImageView/NSImageCell doesn't actually send any actions to any
targets, it's fairly sensible to have it raise an exception for these

What behavior did you expect?

> Could anyone fix it shortly (after CVS is up)? Or, does anyone know
> how to get around it?

Don't call -setTarget: and -setAction: on an NSImageView? :)

> (I tried to use category, but in vain.)

- Alexander Malmberg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]