Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Edward Rutherford <edward.p.rutherford79@REMOVETHIS.gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Call Backs |
| Date | 2012-02-15 19:33 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <jhh1aj$43c$1@speranza.aioe.org> (permalink) |
I've read plenty of discussion about callback functions as used in C (ie in qsort). I'm comfortable with this: really it is a function pointer. What I'm not sure about is how (or if) a callback differs to events like GUI's use. One of the things I found about events, at least in a VB6 project I did, is that an event can be broadcast to all objects and they can use it if desired (code only and GUI objects). Each object has to have a receive function for that event though. The only way I can see to do event broadcasting with a callback is to have a special callback that in turn calls a list of receiver functions that would be in each module. For example, a timer that broadcasts a time tick every second would call a function (for example) Timer_1min(void) that in turn would call functions in all of the modules that need to know the time. I've also thought about a message que, but that is begining to sound like too much work. Is there a better way? Thanks for any helpful information.
Back to comp.lang.c | Previous | Next — Next in thread | Find similar | Unroll thread
Call Backs Edward Rutherford <edward.p.rutherford79@REMOVETHIS.gmail.com> - 2012-02-15 19:33 +0000
Re: Call Backs tom st denis <tom@iahu.ca> - 2012-02-15 11:36 -0800
Re: Call Backs James Kuyper <jameskuyper@verizon.net> - 2012-02-15 15:02 -0500
Re: Call Backs Devil with the China Blue Dress <chine.bleu@yahoo.com> - 2012-02-15 12:27 -0800
Re: Call Backs Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-16 02:56 -0800
Re: Call Backs Lew Pitcher <lpitcher@teksavvy.com> - 2012-02-15 15:20 -0500
Re: Call Backs Devil with the China Blue Dress <chine.bleu@yahoo.com> - 2012-02-15 12:24 -0800
Re: Call Backs Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-15 16:02 -0800
Re: Call Backs Shao Miller <sha0.miller@gmail.com> - 2012-02-16 01:21 -0500
Re: Call Backs Shao Miller <sha0.miller@gmail.com> - 2012-02-16 01:25 -0500
Re: Call Backs Willem <willem@toad.stack.nl> - 2012-02-17 21:58 +0000
csiph-web