bug-gnustep
[Top][All Lists]
Advanced

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

Re: [PATCH (revised)] -setTarget: and -setAction of NSImageView


From: Kazunobu Kuriyama
Subject: Re: [PATCH (revised)] -setTarget: and -setAction of NSImageView
Date: Tue, 13 Jan 2004 11:10:40 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1

Alexander Malmberg wrote:

+// Target and Action
+//
+// N.B: These methods are overridden so that the instances doesn't raise an
+//      exception when they receive a target or action message.


This comment is very misleading (in the same way that confused the
original discussion about this). The methods are overridden because
NSImageCell has a target and an action, unlike NSCell. The fact that the
methods don't throw exceptions is just a side-effect of this; it is not
the purpose of the change.

I understand what you said/is saying now.  The purpose of the comment was
for those who didn't believe NSImageView can receive target/action messages.
Rather I should have put there the URL of the document about it, instead
of the misleading comments.

+  [aCoder encodeConditionalObject: _control_view];


The control view shouldn't be encoded. (NSActionCell used to get this
wrong; I'm guessing that's where it's from.)

I agree.  The ivar is to be set through a method, and thus should not
be encoded there.  I was wrong; I added the line, blindly following
the implementation of NSActionCell.

--- gui/Source/NSImageView.m    2003-12-29 13:57:43.000000000 +0900


+  if ([sender draggingSource] == self || ![self isEditable])


-prepareForDragOperation: already checks this, so checking it again here
is unnecessary.

Because I though the state of the object might be changed by another thread
while dragging, I added the line for safety.  If this argument is not
applicable, it is redundant and therefore unnecessary.




Anyway, unless there are any other ideas about what to do about this,
I'll commit this (with the above issues fixed) soon.

Thank you for sharing your time for that.

- Kazunobu Kuriyama






reply via email to

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