Skip to content

Latest commit

 

History

History
112 lines (75 loc) · 2.96 KB

File metadata and controls

112 lines (75 loc) · 2.96 KB

n_ms

Description

MailSession nonvisual user object ancestor.

Ancestry

Figure

Library

  • PFCMAIN.PBL
  • PFEMAIN.PBL

Usage

Use this nonvisual object instead of the standard PowerBuilder MailSession object.

See also

Instance variables

N_ms includes instance variables:

Instance variable Description Data type Access
ib_IsObsolete Boolean Protected

Functions

N_ms contains one precoded function:

of_MessageBox

of_MessageBox

Description

Displays a MessageBox.

Access

Protected

Syntax 1

instancename.of_MessageBox ( id, title, message, icon, button, default )
Argument Description
instancename Instance name of n_ms
id String specifying an ID for the message
title String specifying the title of the MessageBox
message String specifying the message text
icon Icon enumerated data type indicating the icon you want to display on the left side of the message box. Values are:
• Information!
• StopSign!
• Exclamation!
• Question!
• None!
button Button enumerated data type indicating the set of CommandButtons you want to display at the bottom of the message box. The buttons are numbered in the order listed in the enumerated data type. Values are:
• OK!
• OKCancel!
• YesNo!
• YesNoCancel!
• RetryCancel!
• AbortRetryIgnore!
default Integer specifying the number of the button you want to be the default button

Syntax 2 For a message that contains values (PFC 2025 and later)

instancename.of_MessageBox ( id, title, message, values, icon, button, default )
Argument Description
instancename Instance name of n_ms
values String array. The values for the placeholders in message

The other arguments are the same as in Syntax 1.

Return value

Integer. Returns 1 if the function succeeds and -1 if an error occurs.

Usage

Override this function to control MessageBox behavior in MailSession objects.

PFC 2025 and later When the language service is enabled (see the n_cst_appmanager of_SetLanguage function), the message comes from the language file if it has an entry for id: the entry id replaces message, and the entry id.title replaces title. Without the service, or without an entry, message and title are used as they are.

Use Syntax 2 for a message that contains values: message is the English text with placeholders (%s, or %1 - %9 by position) and values holds the values. Syntax 2 calls Syntax 1 to display the message, so an override of Syntax 1 still sees every message.

Examples

This example calls the of_MessageBox function:

of_Messagebox(’ms_dberror’,’Save’, &
   as_error, StopSign!, Ok!, 1)
...