home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MAGAZINE / MISC / PCTV2N2.ZIP / METHODS.ACT < prev    next >
Encoding:
Text File  |  1990-12-05  |  411 b   |  16 lines

  1. now(class(System));
  2.  
  3. /* Returns the method which called the method in which
  4.    calledFrom is invoked. */
  5. Def calledFrom(self | bp)
  6. { if bp := stackLink(stackTop()) /* find current method */   
  7.   then ^function(new(Context, stackLink(bp)))
  8.   endif;
  9.   ^nil
  10. }
  11.  
  12. /* Returns the method in which currentMethod is invoked. */ 
  13. Def currentMethod(self)
  14. { ^function(new(Context, stackLink(stackTop())))
  15. }
  16.