Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

SET KEY

SET KEY nKey [TO uAction] IN oObj OBJ oID

Binds a key to an action on a historical object.

SET KEYAdvPL
01 · OVERVIEW

Overview

Historical eAdvPL reference, section 1.4. Syntax depends on that implementation’s macros and platform; current SmartClient support is unconfirmed. IN identifies the object; OBJ supplies the identifier named by the reference. This command is not automatically equivalent to SetKey(nKey,bAction) in other contexts. The fragment assumes an environment key constant and existing objects; it invents neither a numeric key code nor action-evaluation timing. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

SET KEY nKey [TO uAction] IN oObj OBJ oID

Return value

No useful return documented in this subset.

03 · PRACTICAL EXAMPLE

Commented example

// Fragment: nKey, oDlg and oId exist; verify action evaluation.
SET KEY nKey TO Alert("Action") IN oDlg OBJ oId
Expected result

Proposes a local key binding rather than a server-wide shortcut. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Verify includes and graphical context in the target release. The fragment assumes the stated objects; it is not a complete application. Do not use in headless execution.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Guia de referência eAdvPL. §1.4. Cópia pública histórica, consultada nas seções citadas. Accessed on 2026-10-28.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha