hi!
initially i thought INSTANTIATING-PROCEDURE was my friend. but it's not supported by objects.
so how to know the .p that NEW'd an object?
thanks!
joey
Why do you want to do that? That's usually a smell test. If that information is really required for an object, then pass the instantiating procedure's handle through the constructor. Better yet, pass the context information instead, leave the procedure handle out of it, and you'll have functionality that's usable anywhere, and not restricted to a single context.
from the object i needed to run a procedure in the instantiating .p. i don't want to pass the handle to the constructor cause in some cases, i may not be calling the procedure.
i moved the procedure into a session super. which works fine for now. but was hoping to be more explicit though by passing RUN xx IN <PROC-HANDLE>. walking the procedure handle chains will get me the handle also.
so, i guess there is no ready made to get to the handle of the procedure? i have to bake one myself.
thanks though.
[quote user="joey eisma"] from the object i needed to run a procedure in the instantiating .p. i don't want to pass the handle to the constructor cause in some cases, i may not be calling the procedure. [/quote]
Then make two constructors - like so:
CONSTRUCTOR MyClass(hHandle AS HANDLE): /* Stuff */ END CONSTRUCTOR. CONSTRUCTOR MyClass(): /* Stuff */ END CONSTRUCTOR.
thanks tim. but..
RUN xx IN <PROC-HANDLE> will not run in the constructor. it's one of the methods that **may** not be called. i don't want to define a handle variable that **may** not be used as well.