path to .cls files

How do you define class files from openedge? (I am using 10.2A under unix)

I read it was relative from the propath, with periods indicating directories.

Example: PROPATH=/home/tom
calling program (in /home/tom) is a one line program with the code "define variable mytest as com.ourcompany.doy.

I am trying to refer to the class "doy.cls" that is located in /home/tom/com/ourcompany/doy.cls.

I am getting: Invalid datatype specified: com.ourcompany.doy. Specify a datatype such as
'character' or the name of a class. (5638)
** Could not understand line 1. (196)

I fear I simply am missing the obvious!

Thanks!
 

medu

Member
the syntax it's just fine, try to see if the 'doy' class compile although i doubt it does (the class name in doy.cls should also be com.ourcompany.doy)

as a side note you probably have a package for the 'product' so you should probably use 'com.yourcompany.yourproduct.*'
 

tamhas

ProgressTalk.com Sponsor
There seems to be some confusion here. Using a name like com.ourcompany.doy implies that somewhere there is a file which is
..../com/ourcompany/doy.cls
I.e., / in the path name is replaced by . in the class name in the class definition or reference.

The PROPATH points to one or more directories in which the com directory is located.

Thus, you either need a com subdirectory in /home/tom containing an ourcompany directory containing a doy.cls file or, if the doy.cls file is in /home/tom, then the class name is simply doy.cls.

Note, that I would strongly recommend that no class files actually appear in com/ourcompany, but rather that there be at least one or two subdirectories below that to create appropriate packages. E.g., guessing wildly that doy is something like date of year, what you should actually have is something like
.../com/ourcompany/util/date/doy.cls
for the location.

USING can help in references ... but not in the original class definition. I.e., if you used the structure I suggested above and you then needed to refer to doy in some other class, you could include a
USING com.ourcompany.util.date.*
reference at the top of the file and then just refer to doy in the body.
 
Hi...

I have the following sintax
Code:
using net.sourceforge.progress.json.*.

The "net" folder is in "C:\OpenEdge\abljson\abl". Inside "json" folder there is a file called "Writer.cls".

Now, I looked for "net/sourceforge/progress/json/Writer.cls" using the PROPATH and it's found!!!

What's the problem with this thing?! How can I configure the Propath to take the classes.

P.D. I'm using OpenEdge 10.01A

Thanks in advance.
 
Hi Medu.

I'm using one of your utilities called ABL JSON. Could you help me to configure it. Although I set the PROPATH correctly the USING statement throw an error.

I attach a PDF file with this ISSUE.

Any help would be appreciated.
 

Attachments

  • USING_Fails.pdf
    154.6 KB · Views: 7

medu

Member
Hi there, as Stefan said using might not be available yet... doubt you can't just go and upgrade just because of that so you can either drop the 'using' and reference the full class names everywhere or you fallback to the procedural version - www.ganimede.ro/help/abljson/files/jsonParser-p.html (not real link, not enough likes it seems)

That's using a 'stored procedures' approach so no need for OO if you're not familiar with.

Edit: Amended to be a URL (Cringer)
 
Last edited by a moderator:
Thank you very Much! Yes, my Open Edge is an ancient legacy Platform but that's what I have to work!
Hi there, as Stefan said using might not be available yet... doubt you can't just go and upgrade just because of that so you can either drop the 'using' and reference the full class names everywhere or you fallback to the procedural version.

That's using a 'stored procedures' approach so no need for OO if you're not familiar with.

Edit: Amended to be a URL (Cringer)

Thanks Medu. Do you say that I have to change the whole thing!? Actually I've tried but OpenEdge 10.01A brokes!!!! (Sends a System Error and it closes) :(
 
Top