• 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: Toggle Buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle Buttons


  • Subject: Re: Toggle Buttons
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 27 Apr 2006 08:21:18 -0400


Normally, you have the button's action set to one method which asks its "sender" for its state.


- (IBAction)stopStart:(id)sender
{
	// check [sender state] and respond accordingly
}

  I recommend reading the following:

http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_7.html

  Hope this helps.

--
I.S.


On Apr 27, 2006, at 7:49 AM, Mathieu Tozer wrote:

I have an NSToggle Button in my user interface, and I have two methods start and end which each press of the button is meant to invoke. The button will act as a switch which starts and stops a timer. I intend to make a managed object when the user clicks 'start' and fill in the start time, and then fill in the end time when the user clicks the toggle button again.

Should I combine the two methods together into the one, and have the method wait until the button is pressed again somehow? Or can I leave the two methods separate?
Perhaps there is a better way to do this?


Thanks for your help! :-)

-Mathieu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Toggle Buttons (From: Mathieu Tozer <email@hidden>)

  • Prev by Date: Re: How to retrieve currencies list
  • Next by Date: Re: NSError: why returned directly?
  • Previous by thread: Toggle Buttons
  • Next by thread: System Services and Mail.app
  • Index(es):
    • Date
    • Thread