Skip navigation.
 
mlRe: How can I retrieve the control's message?
FROM : Nick Zitzmann
DATE : Tue Jan 29 03:05:49 2008

On Jan 28, 2008 AD, at 6:58 PM, ÍõÕ×Ã÷ wrote:

> 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?



The Mac OS X equivalent is to subclass the view and override the 
method that handles the event, such as -keyDown:, -mouseDown:, etc.

But many classes, such as NSTextField, have either an action or 
delegate API that gets called when something happens, such as -
controlTextDidChange:. If either a target/action or a delegate did-
change method is present in the class (or superclass), then you should 
use them instead unless you really know what you're doing.

Nick Zitzmann
<http://www.chronosnet.com/>

Related mailsAuthorDate
mlHow can I retrieve the control's message? ??? Jan 29, 02:58
mlRe: How can I retrieve the control's message? Nick Zitzmann Jan 29, 03:05
mlRe: How can I retrieve the control's message? John Stiles Jan 29, 03:06
mlRe: How can I retrieve the control's message? Douglas Davidson Jan 29, 03:12
mlRe: How can I retrieve the control's message? Constantine Jan 29, 07:37