Wiki Home

VFPSet Classlib


Namespace: VFP
SET CLASSLIB opens one or more class libraries to provide access to a collection of classes. Please discuss the pros/cons to having a one-class-per-classlib (VCX) design versus a multiple-class-per-classlib design.

Please sign your posts even if you have to sign with a pseudonym. It makes it easier to be polite to you. Tom Cerul
This is clearly more of a matter of personal preference than anything else.
NONE of the arguments above are persuasive in the least for either case. Some are erroneous from my point of view.
There are instances in life, and in VFP, where one way of approaching something is equally "good" as another and in such cases personal preference will rule. -- Jim Nelson
We have only a defacto standard of putting many classes in a single (and I use the term lightly) library. If this is just personal preference to you, then ignore the matter. If not, then instead of writing the whole thing off show where there are mistakes.

Consider the following: VFP's own classes (not the FFC) are not stored in any class library. Why must our classes be stored in a library? When you try to subclass one of them VFP responds with "Class filename required." not "class library filename required." The structures of the scx and vcx seem to be identical. So why is the scx not referred to as a screen library?

It seems no one has really thought this through. All I know is there is no clear description of what classes should be grouped together. Frankly everything is personal preference. We can discover alternative ways but it's up to the individual to adopt them. What is important is to have open discussion on these ideas. I feel very frustrated when I come up with an idea and you and others squash it before you've even tried it. -- Mike Yearwood

Sorry, Mike, but I don't see where, in what I commented, I even came close to squashing it!
And you don't know that I've tried it or not, do you?
One thing I know about you, Mike, is that you're persistent. When you believe something you will go as many miles as needed to get your point through. And that's good.
At this point I still see only personal preference as the determinant. The pros/cons above are weak both ways by any technical measure I might use. -- Jim Nelson
It seems like a lot of the "cons" above can be mitigated by simple tools.

the mc() tool to allow you to edit a class without needing to know or specify the lib it is in.

the shareclass browser adding that allows you to copy a single class from one lib to another.
an automated tool to run your SET CLASSLIB calls. -- Bob Archer
Thanks Bob. I've been arguing that many of these addins were invented to work around problems caused by not layout out the classes more atomically instead of what seems to me to be total chaos. It would be good to use the Component Gallery regardless of the class-to-vcx ratio. Can you provide some link to Steven Black's mc utility? -- Mike Yearwood

See also Dup Class X, New Lib X, Add Info X -- vt
Category VFP Commands
Contributors: Peter Crabtree, Mike Yearwood
See Also: VFPSet Procedure PRGvs VCX
( Topic last updated: 2016.03.02 12:21:23 PM )