Ken & everyone else who replied,
I understand the basic concepts & that objects are a good thing < g >, I just can't seem to get the hang of it yet. It seems that my code ends up being all over the place and it's hard to find things. It's obvious to me that I'm doing something wrong, cuz it's supposed to be easier, not harder, but I think I'm missing something important. I guess the only thing to do, is to keep plugging, keep reading mags & online, and keep asking questions. It'll sink in one of these days.
You know one thing that really bothers me is this .... years ago someone, I think it may have been Drew Speedie, had made a case for not putting things in screen code snippets (FPW 2.6), but just calling the functions from the code snippets and the functions were all in the prg that did the calling of the .SPR. I heartily latched onto this concept because all the code for a particular screen was all contained in one prg and not spread out in a gazillion code snippets. It seemed to me a much better way of doing things. Now, with OOP, we're back to putting stuff in a gazillion different places, and this is why I think I may be misunderstanding some basic concepts and I may not be doing things correctly. It seems like a step backward to me.
Any thoughts anyone?
Bonnie
>Bonnie,
>
>>> Another question ... what is the benefit to making these classes instead of just the ordinary old functions/procedures that we're all
> used to using? After all, I ended up putting them into a procedure library that's accessible from the entire project ... what's the diff?
> Enquiring minds want to know! <<
>
>One advantage that I've found is of course encapsulation. I find that my old-style PRG libraries tend to lump into related functions that work on related data. Therefore, I have rearranged them into classes that instantiate into easily understood objects, such as the security object, the data dictionary object, etc.
>
>One thing as well you might consider instead of coding your new classes is using the Custom class. This lets you code it and add properties visually, even though it may never be dropped onto a form. I have gotten into this habit and find it is quite nice, if for no other reason than all of my classes are in the project in the same place.
>
>Just my $.02, hope it helps.