>>>My thinking has been that isolated functions that don't refer to other globals, properties, etc. might as well go into a procedure library.
>>>
>>>Peter Robinson
>
>>The main CW is that a custom object with custom PEMs is OO and a procedure library via SET PROC TO is not.
>(Colin Magee)
>
>
>Well, yes, it's not OO, but I'm still asking which is the best approach. Let me give you an example. Paul Vlad Tatavu has contributed the following function to the KB:
>
> function WeekLastDay(tdDate)
> return tdDate-Dow(tdDate)+7
>
>Now, I would like to have this function handy to use. Should I create
>some kind of date class to contain this and other methods or just
>put in a procedure library? My inclination is to do the latter.
>
>Or looking at it from a different point of view: VFP has gazillions of functions. Is this a problem that they are not methods?
>
>Peter Robinson
IMO, from the point of view of functionality, niether approach is better than the other. I personally prefer to keep as many things as possible in an app OO so I would most likely, in the case of your example, take that function and create a custom method in my 'procedure library' class. That said however, I would like to get input from others if one has an advantage over the other in relation to speed or other issues.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.