On Mon, Sep 15, 2008 at 7:49 PM, Charles Srstka
<[EMAIL PROTECTED]> wrote:
> On Sep 15, 2008, at 3:13 PM, Dave Dribin wrote:
>
>> Hello,
>>
>> Is it safe to use -[NSApplication targetForAction:] with non-action
>> selectors? For example, selectors that have more than one argument, non-id
>> first
On Sep 15, 2008, at 6:56 PM, Graham Cox wrote:
I think you have this a bit backwards, possibly.
You still have to get notified when the first responder changes in
order to tell your info panel to reorganise itself, so why not use
that notification to directly obtain the correct target? Objec
On 16 Sep 2008, at 9:51 am, Dave Dribin wrote:
I've got, say, an info panel that needs to display different stuff
based on some object in the responder chain. What I really want to
do is search the responder chain for an object that conforms to a
specific protocol. I was just picking a m
On Sep 15, 2008, at 6:35 PM, Graham Cox wrote:
What exactly are you trying to do?
I'd say it's not safe, since that usage isn't anticipated, or
necessary. If you could perhaps outline why you think you need it a
better solution can be suggested.
I've got, say, an info panel that needs to d
On Sep 15, 2008, at 3:13 PM, Dave Dribin wrote:
Hello,
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to
On Sep 15, 2008, at 6:30 PM, Julien Jalon wrote:
It's not safe... once the target is found (using
respondsToSelector:, you're right), the action is performed with:
[target performSelector:actionSelector withObject:sender];
which means that anything but an object as a sender will potentially
On 16 Sep 2008, at 6:13 am, Dave Dribin wrote:
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to imply it
It's not safe... once the target is found (using respondsToSelector:, you're
right), the action is performed with:[target performSelector:actionSelector
withObject:sender];
which means that anything but an object as a sender will potentially crash.
The only safe thing you can image is to have an
Hello,
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to imply it just
does a respondsToSelector: on each