>>>That's what I'm trying to avoid. I don't want to create a class for just one use. If I can't use a class at least twice, what's the point of creating it?
>>
>>I see what you mean. Sometimes we create a class that's not gonna be reused in order to "manage complexity". But that's not your case.
>>
>>I think I'm missing your point: if this is something so specific for this button, why don't you just put the code on its Click method?
>
>It's a fairly complex procedure that could really use some sub-programs. The entire code is about 200 lines long and logically can be broken into about 4 different sub-programs.
Bill,
Have you been impacted by too much good advice? For example: don't put much behavior into a form? I know I was. Finally I decided that if it isn't reusable, don't worry about it, place it in the form.
Don't be paralyzed by good advice. Do the best you can and fix it later. The key rule is to keep inheritable behavior in classes. Not everything has to be in objects. I use two procs I SET PROC TO: a general and an application specific one. One advantage of procs is you don't have to worry about datasessions.
Alex
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement