02-23-2012 01:40 PM
Well, you could have used a static event for the boolean (since that doesn't change), but you got the point. As for uses, go read the nugget for some.
02-23-2012 01:48 PM
Gotcha! Haha, I have been thinking of Dynamic registration so much that I coded it that way 🙂 But, I get the point now. In summary for today, If I have 20 controls all numeric, instead of having 20 static events for each control, I can dynamically just register 1 event for numeric type, and go to the corresponding action for whatever numeric control was changed. Assuming the actions are similar. Otherwise, there is no significant benefit of using dynamic registration if each control has it's own event.
02-24-2012 03:00 AM
You shouldn't think of dynamic events as replacements for static events. They are usually used for other situations, where you can't use static events or where using a dynamic event is simpler. If you can use a static event for something, there's no good reason not to.
I don't want to get into specific use cases, because that's only bound by imagination and because some of them have already been covered elsewhere.