Module Dfcddeo.pkg
1//************************************************************************
2//
3// Confidential Trade Secret.
4// Copyright (c) 1993 2E Software, La Mesa California,
5// as an unpublished work. All rights reserved.
6// Portions copyright (c) 1997 Data Access Corporation, Miami Florida
7// DataFlex is a registered trademark of Data Access Corporation.
8//
9//************************************************************************/
10
11//************************************************************************
12// Code_Deo.pkg
13// Version: 1.0 beta
14// Copyright (c) 1993 2E Software
15// Sat 03-20-1993 Created
16//
17// Author: John J. Tuohy
18// --ver 1.1--
19// 03/17/94 Add new param to validate_code to support silence (no error)
20// Added new message GET_Validate_Auto_Prompt. If validate fails
21// during a save an error is reported. If not a save the list is
22// auto-prompted.
23//************************************************************************
24// 3.1 Changes
25// 03/29/95 - Made this a mixin class to be used by all objects needing
26// code deo support. Note that the DF version augments this
27// to send to the code list's list_object
28// 11/10/95 - Added fix for base_item in prompt_description
29//************************************************************************
30
31use VDFBase.pkg
32
33// --------------------------------------------------------------------------
34//
35// Messages added to DEOs to support Code_Selection_List0 and Code_Pick_List0
36// prompting, validate and default values. This gets included automatically
37// by CodeSel (actually CodeCSL) and CodePick.
38//
39// Message Usage
40// --------------- -----------------------------------
41// F Prompt_Description Entry_Item (Prompt_Description(self,###))
42// P Default_Prompt iEntry=MSG_Default_Prompt
43// F Validate_Prompt iValidate=GET_Validate_Prompt
44// P Prompt_Description iExit=MSG_Prompt_Description
45// F Validate_Auto_Prompt iValidate=GET_Validate_Auto_Prompt
46//
47// --------------------------------------------------------------------------
48
49Register_Function List_Object returns integer
50
51register_function Crnt_Description string Val returns string
52register_procedure Default_Code integer Obj# Integer Item#
53register_function Validate_Code integer Obj# integer Item# ;
54 integer Flag returns integer
55register_procedure Display_Description integer Obj# integer Item#
56
57
58class DFCode_DEO_Mixin is a mixin
59
60 { Obsolete=True }
61 Function Prompt_Description Integer Item# Returns String
62 Integer Obj#
63 String St
64 Get Prompt_Object Item Item# to Obj#
65 If Obj# Get Crnt_Description of (List_Object(Obj#)) (Value(self,Item#+base_item(self))) to St
66 Function_return St
67 End_Function // Prompt_Description
68
69 { Obsolete=True }
70 Procedure Default_Prompt Integer Item#
71 Integer Obj#
72 Get Prompt_Object Item Item# to Obj#
73 If Obj# Send Default_Code to (List_Object(Obj#)) self Item#
74 End_Procedure
75
76 { Obsolete=True }
77 Function Validate_Prompt Integer Item# Returns Integer
78 Integer Obj# Rval
79 Get Prompt_Object Item Item# to Obj#
80 // 03/17/94 -- added verbal parameter
81 If Obj# Get Validate_Code of (List_Object(Obj#)) self Item# TRUE to Rval
82 Function_Return RVal
83 End_Function
84
85 // new function Validate_Auto_Prompt
86 { Visibility=Private Obsolete=True }
87 Function Validate_Auto_Prompt Integer Item# Returns Integer
88 Integer Obj# Rval ValAll
89 Get Validate_All_Items_State to ValAll
90 Get Prompt_Object Item Item# to Obj#
91 If Obj# Get Validate_Code of (List_Object(Obj#)) self Item# ;
92 ValAll to Rval
93 If (rVal AND ValAll=0) ;
94 Set Prompt_Entry_Mode to AUTO_PROMPT_ON // else...force an autoprompt
95 Function_Return RVal
96 End_Function
97
98 { Obsolete=True }
99 Procedure Prompt_Description Integer Item#
100 Integer Obj# Rval
101 Get Prompt_Object Item Item# to Obj#
102 If Obj# ne 0 Send Display_Description to (List_Object(Obj#)) self Item#
103 End_Procedure
104
105End_Class
106
107