Now, that's a very nice little item for the toolbox, Bill.  Thanks!

 

One could go slightly farther and change the button caption to TRACE ON when
it is off, and TRACE OFF when it is on.

 

Emmitt Dove

Manager, Converting Applications Development

Evergreen Packaging, Inc.

[email protected]

(203) 214-5683 m

(203) 643-8022 o

(203) 643-8086 f

[email protected]

 

From: [email protected] [mailto:[email protected]] On Behalf Of Bill Downall
Sent: Wednesday, May 05, 2010 14:16
To: RBASE-L Mailing List
Subject: [RBASE-L] - Turn trace on while a form is running

 

All,

 

I know this won't help Jim trace a Report, but here is a shared trick I use,
to be able to turn on debugging while a form is running:

 

1) Select and Copy (Ctrl-C) the lines below, from the beginning of "object"
to the end of the lower-case "end"

 

object RBitBtn1: TRBitBtn

  Tag = 32079262

  Left = 1

  Top = 1

  Width = 40

  Height = 21

  UseByRForm = False

  HideOnStartup = True

  Caption = 'Trace'

  TabOrder = 1

  CompID = 'TraceButton'

  EEPNum = -1

  CustomEEP.Strings = (

    'SET VAR vTraceIs = (cval('#39'TRACE'#39'))'

    ''

    'IF vTraceIS = '#39'On'#39' THEN'

    '  SET TRACE OFF'

    'ELSE'

    '  SET TRACE ON'

    'ENDIF'

    ''

    'RETURN')

end

 

2) In the Form Designer, click in your R:BASE form, and then paste (Ctrl-V).


   A "hide on startup" button with the caption "trace" will appear in the
upper left corner of the form or container you click in.

 

3) Drag it to a place where it's out of the way.

 

4) In your "On after start" eep, put code like this (but with what your own
computer shows for CVAL('computer')):

 

SET VAR vDeveloperOptions TEXT

IF vDeveloperOptions = 'TRUE' OR (CVAL('computer')) = 'myPCComputerName'
THEN

  PROPERTY traceButton VISIBLE 'true'

ENDIF

 

If you are working on your own system, the button will always appear. If you
are at the customer site, go to an R> prompt and 

 

SET VAR vDeveloperOptions TEXT = 'true'

 

and then run the form.

 

Bill

 

 

object RBitBtn1: TRBitBtn

  Tag = 32079262

  Left = 1

  Top = 1

  Width = 40

  Height = 21

  UseByRForm = False

  HideOnStartup = True

  Caption = 'Trace'

  TabOrder = 1

  CompID = 'TraceButton'

  EEPNum = -1

  CustomEEP.Strings = (

    'SET VAR vTraceIs = (cval('#39'TRACE'#39'))'

    ''

    'IF vTraceIS = '#39'On'#39' THEN'

    '  SET TRACE OFF'

    'ELSE'

    '  SET TRACE ON'

    'ENDIF'

    ''

    'RETURN')

end

 

Reply via email to