Hack to Show R-Code Information

Posted by Jeff Ledbetter on 27-Sep-2016 09:38

The other day, a customer asked us if it was possible to show the r-code date for the selected Object. We entered a CR, but since they are using the GUI client I thought it would be a easy thing to hack in.

Adding this trigger to _rtb.p does the trick.

ON 'CTRL-ALT-R' ANYWHERE DO: 

  DEFINE VARIABLE cFile AS CHARACTER NO-UNDO.   
  DEFINE VARIABLE cFiles AS CHARACTER NO-UNDO. 
  DEFINE VARIABLE hSdo AS HANDLE NO-UNDO. 
  DEFINE VARIABLE rObject AS ROWID NO-UNDO. 

  PUBLISH "evRtbGetCurrentObjRowid" (OUTPUT rObject). 
  PUBLISH "evRtbGetObjSdoHandle" (OUTPUT hSdo). 

  ASSIGN 
    cFiles = DYNAMIC-FUNCTION('fnRtbGetObjectRcodeFilenames' IN hSdo, rObject) 
    cFile = ENTRY(1, cFiles). 

  FILE-INFO:FILE-NAME = cFile. 

  MESSAGE 
    "Object : " DYNAMIC-FUNCTION('fnRtbBaseName', FILE-INFO:FILE-NAME) SKIP 
    "Compiled: " FILE-INFO:FILE-MOD-DATE SKIP 
    "Size : " FILE-INFO:FILE-SIZE 
    VIEW-AS ALERT-BOX INFO 
    TITLE "Roundtable". 

END.

All Replies

This thread is closed