It's a PITA if it is causing me a PITA. Whether or not it is supposed to
cause me a PITA is irrelevant :-)
>>
I do wonder if what you're doing wouldn't be better addressed using an
interface that defines the property you seem to be implementing via
anonymous methods here, but that's a different question altogether. :)
<<
I agree that it is more like an interface and to be "more proper" should be
implemented as an interface. However, this would result in the same thing,
lots of subclasses :-) I am basically binding a reusable GUI "Record Stock
Levels" to different classes, so this is acting like a mediator.
Case 1:
Quantity maps to StockCheck.QuantityOnHand
Case 2:
Quantity maps to Replenishment.QuantityAdded
Case 3:
Quantity maps to Replenishment.OpeningLevel
and so on, there are about 6 cases. I just thought having a single class
with delegates for Get/Set quantity would be easier than having to write a
mediator for each class. I don't want to add an interface to StockCheck etc
because the interface would be for GUI purposes only, and I don't like
adding GUI specific stuff to my business classes, it's a PITA ;-)
Knowing that a local variable will do the trick is useful information that I
will put to good use in future.
Pete