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: Fred Kiefer
Subject: Re: [PATCH (revised)] -setTarget: and -setAction of NSImageView
Date: Thu, 15 Jan 2004 02:21:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Thank you Quentin,

but at GNUstep we prefer not to have a direct contact with Apple code or headers. I personaly think, that looking at headers should not be to problematic, but after the recent development with SCO we cannot be to careful. So please don't send any more information that has been directly captured from Apple copyrighted files,

On the other hand your findings and that of Ken Ferry cleary show that Apple did implement the setTarget: and setAction: methods on the level of the NSImageView. So we rather should do this as well on GNUstep.

Cheers
Fred


Quentin Mathé wrote:
Le 13 janv. 04, à 21:01, Fred Kiefer a écrit :

Alexander Malmberg wrote:

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!


Here are the Mac OS X headers for NSImageView and NSImageCell :

@interface NSImageView:NSControl
{
    char _editable;
    id _target;
    SEL _action;
}

@interface NSImageCell:NSCell <NSCopying, NSCoding>
{
    id _controlView;
    struct __ICFlags _icFlags;
    struct _NSImageCellAnimationState *_animationState;
    NSImage *_scaledImage;
}

Hope that will help.

Quentin.

--
Quentin Mathé
qmathe@club-internet.fr








reply via email to

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