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.
I hope these tiny paches fix the problem (at least for the
example source I mentioned).
I hope they do no harm to the rest of the library.
I would appreciate it if someone could confirm this.
2003-12-24 Kazunobu Kuriyama <[EMAIL PROTECTED]>
* Source/NSImageView.m (-performDragOperation): Let target call
action.
* Source/NSImageCell.h: The super class NSCell is replaced with
NSActionCell.
--- NSImageCell.h.orig 2003-08-01 08:52:08.000000000 +0900
+++ NSImageCell.h 2003-12-24 00:46:13.000000000 +0900
@@ -29,7 +29,7 @@
#ifndef _GNUstep_H_NSImageCell
#define _GNUstep_H_NSImageCell
-#include <AppKit/NSCell.h>
+#include <AppKit/NSActionCell.h>
typedef enum {
NSScaleProportionally = 0, // Fit propoRtionally
@@ -57,7 +57,7 @@
NSImageFrameButton
} NSImageFrameStyle;
[EMAIL PROTECTED] NSImageCell : NSCell
[EMAIL PROTECTED] NSImageCell : NSActionCell
{
// Attributes
NSImageAlignment _imageAlignment;
--- NSImageView.m.orig 2003-06-14 00:01:11.000000000 +0900
+++ NSImageView.m 2003-12-24 02:15:53.000000000 +0900
@@ -192,8 +192,12 @@
}
else
{
+ id target = [[self cell] target];
+ SEL action = [[self cell] action];
+
[self setImage: image];
RELEASE(image);
+ [target performSelector: action];
return YES;
}
}
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep