[Top][All Lists]

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

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

From: Fred Kiefer
Subject: Re: [PATCH (revised)] -setTarget: and -setAction of NSImageView
Date: Tue, 13 Jan 2004 21:01:30 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Alexander Malmberg wrote:
Kazunobu Kuriyama wrote:

--- gui/Headers/AppKit/NSImageCell.h    2003-12-29 13:57:42.000000000 +0900


+  int _tag;
+  id _target;
+  SEL _action;
+  id _control_view;

However, the general idea was to add target and action. Adding a tag and
a control view effectively turns NSImageCell completely into an
NSActionCell, it isn't required to get dragging working, and it isn't in
apple's docs (but then, target and action aren't, either).

However, I think adding them now is the right thing to do. The cost
(amount of code) is low, it makes NSImageCell more useful, and by adding
all the stuff at once, we won't have to change the ivar layout/encoding
format twice if it turns out that we want them later (eg. because apple
really did add them, or will).

I don't see any benefit in this additional ivars. Also the main problem why there still is no patch for this is on a different level. What we need to decide is wether to implement the storing of target and action on the cell (as gets done by NSActionCell) or on the view (as done by NSMatrix and loads of others). Here only a test on a MacOSX system could show how Apple did introduce this partly documented feature. But no one with a Mac system has commented on this up to now, that is why the problem may stay unresolved for some more time. There is no abstract way of telling which way around it should be done. As both are in themselves valid.

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

No, please wait until this question gets answered. If we get the encoding wrong once, we will have to support it for ever!


reply via email to

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