Forum Post: RE: Strange error: Cannot use NEW statement with class 'xxx' using a protected...

  • Thread starter Thread starter Peter Judge
  • Start date Start date
Status
Not open for further replies.
P

Peter Judge

Guest
Does it make any sense or have any impact to have that top level super somewhere other than the first statement? Compiler won't allow a SUPER() or THIS-OBJECT() call to be anywhere but the first line of a constructor. This is because the object tree is built top-down since children can reference public and protected members in their constructors. If the first (statement, as opposed to DEF VARs) line is NOT SUPER() or THIS-OBJECT() then the AVM calls SUPER() – the default constructor. This is true of a first-generation child too. PLO has only the single default constructor which results in that constructor always being run, either via an explicit SUPER() call or by default. -- peter From: Thomas Mercer-Hursh [mailto:bounce-tamhas@community.progress.com] Sent: Friday, 14 November, 2014 13:54 To: TU.OE.Development@community.progress.com Subject: RE: [Technical Users - OE Development] Strange error: Cannot use NEW statement with class 'xxx' using a protected constructor. (12959) RE: Strange error: Cannot use NEW statement with class 'xxx' using a protected constructor. (12959) Reply by Thomas Mercer-Hursh Understood. Let me ask this. Is there any difference in the sequence of operations if it is there or not? Does it make any sense or have any impact to have that top level super somewhere other than the first statement? Stop receiving emails on this subject. Flag this post as spam/abuse.

Continue reading...
 
Status
Not open for further replies.
Back
Top