Classes

Hi all

I'm trying to start using classes in our application. Currently we're working with version 10.1A.
I've created my class, but how should I use this class in my applications?

I've tried to use it as an include file, but that doesn't work.

any help would be appreciated
 

oriol

New Member
I do it this way:

Code:
DEFINE VARIABLE x AS className.

x = NEW className().
x:classMethod().
 
thanks oriol.

So the only thing I need to do is to make sure my class files are in my propath, and then I can call that object from anywhere on the way you showed me?
 

oriol

New Member
Yes, I don't need to include any file. I use architect and all the files are in the folder of my project. I'm new in openedge but I supose that if you have your class in a different folder you only should include it in your propath.
 

RealHeavyDude

Well-Known Member
I can only second what Tamhas said:

OO programming is a completely different approach on developing an application. Using classes just for the sake of using them is probably not a good idea. While you might succeed developing an application to a certain degree without a proper design in the first place, a good design is the basis on which you build an OO application.

Heavy Regards, RealHeavyDude.
 

tamhas

ProgressTalk.com Sponsor
Which said, check out the talks at http://pugchallenge.org/agenda.html . Tim Kuehn's is directed at legacy 4GL programmers and giving them an idea of how to map what they know onto class constructs while mine is directed and learning to *think OO*.
 
@RealHeavyDude: We'll not use classes just for using them. It's a first step to OO programming. We will be start by grouping our parameters (which appear in serveral reports) in classes, so we can use the class as parameter instead of a lot of input parameters.

you've to start with something. and later we'll create OO applications but that can take some months, years... :)
 
Top