Release 10.1A: OpenEdge Development:
ADM Reference

> ## messageNumber

> Returns the message text given a message number. Allows these messages to be translated and tracked in one place.

> Location: smart.p

> Parameters:

> `INPUT piMessage AS INTEGER` Returns: CHARACTER

> Notes:

> - In order to allow certain messages to be translated, it is helpful to group them into a single file, since the ADM super procedure source files are not otherwise regarded as part of a translatable application. To facilitate this, messages that are expected to be seen by end users and, therefore, should be translated are located in a single include file (`src/adm2/admmsgs.i`) in the form of a character array. This allows a translated version of this single file to be substituted and `smart.p`, which includes `admmsgs.i`, to be recompiled or run through the Translation Manager tool in order to translate end-user messages that are raised from code located in super procedures.

> - The messageNumber function is normally invoked from the addMessage procedure, as in the example.

> - The ADM convention is that error messages that are expected to be seen only by developers or application testers (errors indicating errors in application construction, for example, caused by missing links or the like) are not translated, and, therefore, appear in the super procedures as literal strings with the :U suffix.

> Examples:

>     /* This example retrieves the text for message number 4 ("Current values
>        must be saved or cancelled before Commit.") and passes it to the
>        addMessage procedure to add that message to the error message log. */
>     RUN addMessage (messageNumber(4), ?, ?).

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095