Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual vs Programmatic Class Definitions
Message
 
To
27/03/1998 04:13:45
Steve Camsell
Windmill Associates
Bath, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00087575
Message ID:
00087627
Views:
33
>>Not sure I got the essence of your posting, but are aware that you can have multiple procedure files open at the same time, allowing you to put each "area of concern" in a separate file?
>>
>Hi Marc,
>
>Sorry I wasn't clear enough, let me try again. I design all of my classes using the class design tool in Fox. Everything is built visually. To include a custom class with a form, I just drag the class from the project manager and drop it on the form.
>
>My boss on the other hand, creates all of his custom classes in a prg using DEFINE CLASS. He includes these class definitions in his projects by adding a SET PROCEDURE to [prg] in his app. When he requires a custom class on a form, he does a CREATEOBJECT() in the INIT of the form.
>
>I prefer the visual route, he prefers to define his classes manually. My question is, what are the pro's and con's either approach?

Steve,

If you're looking to find quantitative reasons as to why one is better than the other, I don't think you can. It's largely a matter of personal preference. For example, it can be argued that producing a class using the class designer may be more in keeping with OOP principals. However, that could be countered by asking, "Why have a visual representation of a non-visual object?"

So rather than trying to enumerate the pros and cons of each, I'll simply tell you why I prefer to use a program file. True, there's a little more work involved, in that methods like Init have to be actually written, and aare not predefined for you. Overall, however, I think this is so minute that it isn't any concern. I like being able to right click the program file and go immediately (from the procedure list) to the particular area in the file. For me, it's more convenient than having to go to the dropdown, property sheet, or Window Menu to locate a particular method. Of course, I do wish that the list would move there, and then close on a double click, but I can live with what's there now.

Someone else, however, might tell you that they prefer the property sheet. To them I'd say, terrific, whatever works for you.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform