Module Dfbscent.pkg
1
2//************************************************************************
3//
4// Copyright (c) 1997 Data Access Corporation, Miami Florida,
5// All rights reserved.
6// DataFlex is a registered trademark of Data Access Corporation.
7//
8// 08/19/94 JJT - Blended Classes from CB and DAF
9// 09/28/94 JJT - Added Entering to help with previous & switch_back
10// 10/28/94 JJT - Added better switch logic.
11// Added automatic prompt button creation support.
12//
13//************************************************************************
14// 4.0 Changes
15// 01/18/97 JJT - Disabled Prompt Key (f4 invoke drop down list)
16// 07/23/96 JJT - New Class names
17// 06/03/96 JJT - Added DEO_Control_Object ID
18// 03/28/95 JJT - Removed Layer for 0 class
19// Added DF navigate and Help DEO support.
20// Changed name to dfentry.pkg
21//************************************************************************
22
23Use Windows.pkg
24Use EnFrm_ds.pkg
25Use DFNav_mx.pkg // Navigation changes for DF DEOs
26Use DFCdDeo.pkg // DEO Code message support
27
28{ ClassType=Abstract }
29{ HelpTopic=dbBasicComboForm_ }
30Class dbBasicComboForm_ is a ComboEntry STARTMAC EFstart
31 // the startmac is used to catch old obsolete code at compiletime
32 Import_Class_Protocol Entry_Form_ds_mixin
33End_Class
34
35//
36// DFENTRY_FORM
37//
38{ ClassType=Abstract }
39{ DataBindable=True }
40{ HelpTopic=dbBasicComboForm }
41Class dbBasicComboForm is a dbBasicComboForm_
42
43 Procedure Construct_Object
44 Forward Send Construct_Object NO_IMAGE
45
46 Send Define_DFNavigation // GUI navigate changes
47
48 //Property Integer floating_panel_object (deo_floater(self))
49
50 // This is a DAF compromise. Validation messages on single item
51 // based objects do not work well at all. You get validates when
52 // you exit the object (up or down). This fires way too many validates.
53 // This needs to be fixed but is beyond the scope of DAF. Here, we will
54 // change item validate to only validate on forward (next) navigation
55 // and, of course, on saves. The biggest problem here is that a
56 // single item mouse forward will not validate where a Tab/enter
57 // will. I have no better solution.
58 //
59 Set Validate_Mode to VALIDATE_ON_SAVE_NEXT
60 { Category="Error Handling" }
61 Property Integer Error_Number 15
62 { Category="Error Handling" }
63 Property String Error_Message ""
64
65 // Disable F4 from prompting since it drops down the list.
66 // Prompt is still available because you may have prompt list
67 // and a combo at the same time.
68 On_Key kPrompt Send Default_Key
69 End_Procedure // Construct_Object
70
71 Import_Class_Protocol DFNavigate_Mixin
72 Import_Class_Protocol DFCode_DEO_Mixin
73
74//** Temporarily disabled until interface for this is created!!!
75//** // augment left mouse down to pop up a floating panel. Default name is
76//** // deo_floater.
77//** Procedure mouse_down2 integer i1 integer i2
78//** integer obj
79//** Get Floating_panel_object to obj
80//** if obj eq 0 ;
81//** Forward Send mouse_down2 i1 i2
82//** else begin
83//** send mouse_down i1 i2 // activate
84//** if ( focus(desktop)=self AND ;
85//** Item_window(self)=i1 ) ;
86//** Send activate to obj
87//** end
88//** End_Procedure // mouse_down2
89
90
91 // Validate against the combo list. report Error DFERR_BAD_ENTRY if bad!
92 // Can be used by iValidate
93 //
94 { Visibility=Private }
95 function validate_Combo_item integer item# returns integer
96 integer rval
97 get validate_Combo_value to rval // built into combo class
98 if rval ;
99 Error (Error_Number(Self)) (Error_Message(Self))
100 function_return rval
101 end_function
102
103 // We should make sure the list is filled when the DSO knows about the
104 // DEO. This way validations will be current.
105 //
106 { Visibility=Private }
107 Procedure Attach_Deo_To_Server
108 Forward Send Attach_deo_to_Server
109 Send Combo_initialize_list
110 End_Procedure
111
112 // Returns TRUE to indicate that this is a DEO control. This is used by
113 // if you are within a DEO control message and should therefore
114 // send a DEO message.
115 //
116 { MethodType=Property }
117 Function DEO_Control_Object Returns integer
118 Function_Return 1
119 End_Function // DEO_Control_Object
120
121 { Visibility=Private }
122 Procedure Bind_Data integer File# Integer Field#
123 Set Data_File item 0 to File#
124 Set Data_Field item 0 to Field#
125 Set New_Item to 0
126 Set Message item 0 to msg_Next
127 End_Procedure // Bind_Data
128
129End_Class
130