• 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: How can I retrieve the control's message?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I retrieve the control's message?


  • Subject: Re: How can I retrieve the control's message?
  • From: John Stiles <email@hidden>
  • Date: Mon, 28 Jan 2008 18:06:02 -0800

In Cocoa, you don't run the event loop yourself, so there aren't events like this. Instead, most things like this happen via delegates, and in some rare cases, subclassing.

For instance, when the user types into an NSTextField, the delegate method "textDidChange:" is invoked. You need to set a delegate on the NSTextField and implement textDidChange: in your delegate class.


王兆明 wrote:
I'm a Windows programmer, and have been written program for Linux some
times, now, I try to learn programming under Mac.

But, as you know, in Windows, there are many System-Defined custom messages,
such like WM_KEYDOWN, or, WM_NOTIFY, with these I can retrieve many
information or actions occurred on controls, such like the TreeView.

But in Mac, in cocoa, I can't find anything like them, I even don't know how
to hook the action when user input some text into the TextBox or when user
have select some node in TreeView, who can tell me, how to do this?

Thanks again.

_______________________________________________

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
_______________________________________________

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: 
 >How can I retrieve the control's message? (From: 王兆明 <email@hidden>)

  • Prev by Date: Re: How can I retrieve the control's message?
  • Next by Date: Re: How can I retrieve the control's message?
  • Previous by thread: Re: How can I retrieve the control's message?
  • Next by thread: Day designations in Leopard
  • Index(es):
    • Date
    • Thread