ABL and Internal-Entries attribute

DevTeam

Member
Hi,

I tried to use "THIS-PROCEDURE:INTERNAL-ENTRIES" statement inside a .cls file, but the compiler returns "this-procedure may not be referenced in a class (12894)".

When I call it from another program on my object reference, I get a "Could not locate element ... in class ... '' error message.

So it seems to work with .p only. Is there an ABL equivalent ?

Thanks in advance.

Julien
 

Casper

ProgressTalk.com Moderator
Staff member
If you want to reference a method inside a class then you can use the this-object system reference which is
An object reference to the currently running class instance that you can optionally use to access class members defined within the current class hierarchy.

There was a previous discusion here @progresstalk on dynamcially running methods in classes: http://www.progresstalk.com/showthread.php?t=114252 (started by yourself) which discusses the fact that this is not (yet) possible.

Casper.
 

DevTeam

Member
I'm not sure I get your post right...

I'm looking for an equivalent to internal-entries in the ABL-OO world, in order to avoid such things :
Code:
METHOD PUBLIC CHAR getLstMethods() :
  RETURN 'Meth1,Meth2,Meth3,Meth4'.
END METHOD.

I can see why you link this post to the other one (thanks to trust my memory, BTW), but let's say that, for the moment, I just want a class to get another class' list of methods... Do I have to code it myself, or is there an embedded mechanism similar to internal-entries ?

Thanks, and sorry for my misunderstanding (... would need English courses)
 

Casper

ProgressTalk.com Moderator
Staff member
Sorry, I didn't want to be blunt....

This also has to do with refelection IMO, but to answer your question: AFAIK there is no such meachanism in the ABL fpr classes.
But then again every method in a class has its purpose dedicated to that class.
So a 'common' conditional method seems somehow strange to me.
I say this because we use this-procedure:internal-entries mechanism to conditional run a procedure, but maybe you had something different in mind.

Casper.
 

DevTeam

Member
I say this because we use this-procedure:internal-entries mechanism to conditional run a procedure, but maybe you had something different in mind.

That's what's usually done here too, but I've just found a code sample where an action is performed only if THIS-PROCEDURE:INTERNAL-ENTRIES matches a given character string. This seems mainly due to includes with preprocessing options...
 

tamhas

ProgressTalk.com Sponsor
And, again, this is the sort of thing which two pass compilation of OO is supposed to avoid.
 
Top