• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Make connections between One Button and two different NSObjects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make connections between One Button and two different NSObjects?


  • Subject: Re: Make connections between One Button and two different NSObjects?
  • From: "I. Savant" <email@hidden>
  • Date: Mon, 4 May 2009 15:12:46 -0400

  You're probably going to have to be more clear about what you want
to do. You seem to be asking a few different questions:

> can you make two connections between One Button and two different NSObjects?

  Yes. What kind of connections are you interested in? Do you instead
mean target/action connections? In that case, there is only one target
and one action for a given control.


> is it possible? to have two different IBActions go off?

  Yes. Your button could be connected to a controller (with an action
of -doTwoThings:) and that action could, in turn, call two other
actions (passing its own sender to the others).


>   or some other way
> of controlling a single button from two different objects?

  Anything can send your button a message. It just has to have a
reference to it. Three thousand different controllers could have a
reference to your button (however they want to call it), and each
could message your button to 'control' it.

  ... but I don't think that's what you meant to say. You need to be
careful to learn and properly use the terminology and, above all else,
keep in mind from where / to where your messages are flowing.


> I want a normal controller,   but then i want to hide,  and unhide the
> button from the actions of a different window....

  This is unclear. Try to explain *exactly* what you're trying to
accomplish and all the relevant background (like your app's setup).

--
I.S.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Make connections between One Button and two different NSObjects? (From: Jon <email@hidden>)

  • Prev by Date: Re: NSOutlineView with NSImage and NSStrings
  • Next by Date: Re: NSOutlineView with NSImage and NSStrings
  • Previous by thread: Make connections between One Button and two different NSObjects?
  • Next by thread: Question of .png and 'transparency'
  • Index(es):
    • Date
    • Thread