Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > hook functions?

hook functions?
Thread Tools
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Oct 29, 2003, 11:04 AM
 
In other (C++) API's I've dealt with, there's been a distinction between
member functions (err.. methods) that *you* (the client programmer)
call when you need to use them, and methods that the *system* calls
for you that you may override in your classes for specific stuff you
want done (ex. NSView::-awakeFromNib: and NSView::-drawRect:, init:).

I've always referred to these as "hook functions" because they provide
hooks into the API onto which you can attach your code.

Is there a special name for them in Objective-C/Cocoa?
     
Mac Enthusiast
Join Date: Jan 2001
Status: Offline
Reply With Quote
Oct 29, 2003, 01:13 PM
 
Hooks and callbacks are C-esque, In objC, I just refer to it as overriding methods (/subclassing)... eh, people will understand you pretty much no matter what.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 29, 2003, 01:58 PM
 
There are also other things you should be aware of which have specific terms, such as delegate methods.
     
johnMG  (op)
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Oct 30, 2003, 12:36 PM
 
Thanks. I guess the docs are pretty clear about which methods are ... erm, which messages get sent to your GUI objects by the NSApplication (I think that's who divvies out the messages to the different NSView).

There are also other things you should be aware of which have specific terms, such as delegate methods.

At first I thought "delegate method" was the term I was looking for, but I see now that it's a different animal. :)
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:20 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2