The &MESSAGE preprocessor directive...

Allan Green

New Member
This is almost trivial, but I guess all OpenEdge developers who have ever tried to use &MESSAGE will understand...

(I should add that I restrict the use of &MESSAGE to code development/experimentatioin, users (I hope!) should never get to see this output!)

Anyway, my query is; has anyone found a way to avoid the "Error" header in an &MESSAGE output box, e.g.

┌───────────────────────── Error ──────────────────────────┐
│ cMetabaseExportedImageListPath: ./MetabaseExportedImages │
│ │
│ ──────────────────────────────────────────────────────── │
│ <OK> │
└──────────────────────────────────────────────────────────┘

(Sorry cannot find a way to show the above paste in a fixed-width font!)

When every &MESSAGE is displayed as an error, even when it doesn't reflect an error, it becomes a bit confusing...

(This is OE11.1 but both the app I work on and I are retiring in the next few months... :) )

Best wishes,

Allan.
 
I don't think it is possible. A workaround might be to use &IF and then do a normal MESSAGE VIEW-AS ALERT-BOX

Code:
&IF DEFINED(UIB_IS_RUNNING) = 0 &THEN
  MESSAGE 'Hello world'
    VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
&ENDIF
 
Thanks Patrick! Yes, this would work at runtime, but I'd like to use &MESSAGE at compile time to display the options I have set via

&SCOPED-DEFINE option 123
...
&MESSAGE {&option}

Sometimes (!) my code doesn't get as far as being runnable...

(I've been half-heartedly trying to work around this for years, and just ignored the "Error" message heading but sometimes I do actually want to flag errors!)

Best wishes,
Allan.
 
Back
Top