Alexander Malmberg wrote:

Kazunobu Kuriyama wrote:

Hi,

Because no one gives me any solution to my problem on NSImageView,
I offer my own here. They simply makes NSImageView enable
target/action without raising an exception.


Not really; they also make it send the action when an image is dropped on it, but that's the point of the behavior change, so that's ok. :)

Thank you for improving my coarse explanation. Your effort helps
our good understanding on the issue.
(snip)

[patch]

[EMAIL PROTECTED] NSImageCell : NSCell
[EMAIL PROTECTED] NSImageCell : NSActionCell


This is a very dubious change. The design is sane, but it's a pretty big change, and it's against the docs. I'm going to think about it for a while and let others comment on it.

Thank you for taking that trouble.



As it is, it also breaks decoding of old NSImageCell:s, which is
definitely not ok. If we decide to make this change, -initWithCoder:
will have to be updated to handle it.

I failed to pay attention to this point. Good suggestion.



[...]

+ [target performSelector: action];


This is wrong. You need to handle nil targets, nil actions, the sender argument, etc. To send an action, use [self sendAction: action to: target]. It will handle all that for you.

Now I begin to understand the difference between primitive -performSelector:
and -sendAction:to:.  Thank you.




_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to