OD hooks system implementation curiosity

This forum is for programmers who have questions about the source code.
Post Reply
alkhaef
Posts: 105
Joined: Fri Jul 02, 2010 10:37 am
Location: Los Angeles, CA

OD hooks system implementation curiosity

Post by alkhaef » Fri Jul 02, 2010 2:46 pm

Just a curiosity question...

Events built into c# / .net could be seen as a possible alternative to the hooking approach taken, correct?

I'm sure you guys had good reasons for the choice, so I'm curious if you can elaborate on the advantages to the current approach.

Thanks and best regards,
Al
Al
Help! I've OD'ed on OD! :)

User avatar
jordansparks
Site Admin
Posts: 5770
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: OD hooks system implementation curiosity

Post by jordansparks » Fri Jul 02, 2010 7:08 pm

I don't understand. Feel free to propose some code that performs the same task. First review the exact problems that the hooks solve. Make sure your proposed solution actually solves those problems.
Jordan Sparks, DMD
http://www.opendental.com

alkhaef
Posts: 105
Joined: Fri Jul 02, 2010 10:37 am
Location: Los Angeles, CA

Re: OD hooks system implementation curiosity

Post by alkhaef » Fri Jul 02, 2010 8:14 pm

Dr. Sparks,

Thanks for the quick reply.

Actually, I wasn't proposing any changes. The hooks system as-written is quite elegant, and I'm excited to start using it. I was just curious about the thinking behind the implementation choice.

Anyway, since code for using c# events as hooks instead would be all over the place, I can't quickly/easily whip up code demonstrating what I mean for your review. Once my toolchain is setup, maybe I'll write and test the necessary code for providing just the one hook that I've requested using the events approach. I'm guessing the reasoning will jump out at me at that point ;), and that would be just a few lines total.

Best,
Al
Al
Help! I've OD'ed on OD! :)

Post Reply