class file compilation error in 10.1A

Posted by Admin on 03-Feb-2010 03:18

Hi

while compiling class file in OpenEdge  10.1A some copilation error is getting like below,

Constructor must specify PUBLIC or PROTECTED access mode. (12992)          │
         return tt-as-sysflag.flg-activ│ │**  Could not understand line 5. (196)

But same is compilable in version 10.1B.

Is version 10.1A not supporting the class file concept?

Please advice me to resolve thid issue.

All Replies

Posted by Admin on 03-Feb-2010 03:31

The OO ABL language has been heavily enhanced in every release (or service pack) since 10.1A. 10.1A introduced class files, but it might be very certain that 10.1B introduced new language features that won't work or compile on 10.1A.

The message suggests that 10.1B started support for PRIVATE constructors in classes, that 10.1A might not have had.

As a general rule - when using relatively new language elements - it's ALWAYS a bad idea to develop with a newer version than you plan to use the code on. Vice versa might be o.k. in most environments - but should still require good testing.

>        return tt-as-sysflag.flg-activ│ 

I can't see how this line is related.

 

Posted by Admin on 03-Feb-2010 05:33

Hi

Thanks a lot...............

In 10.1A We need to specify PUBLIC/PRIVATE for all methods and costumers . Otherwise it will throw compilation error.

In 10.1B it is not mandatory. I am using the version 10.1A so the error comes.

Posted by Thomas Mercer-Hursh on 15-Feb-2010 11:02

You might get more of a response on the OO forum (under OpenEdge)

It would also help to show the offending code.  Is your constructor defined as PRIVATE?  How then do you expect it to get run?

This thread is closed