Module BaseData_Set.pkg
1// BaseData_Set.pkg - defines base data C class.
2
3Use UI
4
5{ ClassType=Abstract ClassLibrary=Common }
6{ HelpTopic=BaseData_Set }
7Class BaseData_Set is a cObject ; // _Data_Set inherits from simple, non visual class
8 STARTMAC dsStart ; //dsStart macro is used to handle syntax
9 0 0 ; //default colors
10 Data_Set_Handler //C-function for base class behavior
11 !A [] $461 U_BaseDATA_SET //register C messages
12
13// these are used to define the meta classes.
14//
15
16#IF (0)
17
18 { MethodType=Property Visibility=Private }
19 Function Object_Size Returns Integer
20 End_Function
21
22 { Visibility=Private }
23 Procedure Init_Class
24 End_Procedure
25
26 { Visibility=Private }
27 Procedure Init_Instance
28 End_Procedure
29
30 { MethodType=Event NoDoc=True }
31 Procedure Destroy_Object Integer Arg1
32 End_Procedure
33
34 { MethodType=Property }
35 Function Should_Save Returns Boolean
36 End_Function
37
38 { MethodType=Property }
39 Function Should_Save_Row Returns Boolean
40 End_Function
41
42 { MethodType=Property }
43 Function Changed_State Returns Boolean
44 End_Function
45
46 { MethodType=Property }
47 { DesignTime=False }
48 Procedure Set Changed_State Boolean bChanged
49 End_Procedure
50
51 { MethodType=Property }
52 Function Parent_Changed_State Returns Boolean
53 End_Function
54
55 { MethodType=Property }
56 Function In_Use_State Returns Boolean
57 End_Function
58
59 { MethodType=Property }
60 { DesignTime=False }
61 Procedure Set In_Use_State Boolean bInUse
62 End_Procedure
63
64 { NoDoc=True }
65 Procedure Attach_Deo_To_Server
66 End_Procedure
67
68 { NoDoc=True }
69 Procedure Add_Focus Handle hoParent Returns Integer
70 End_Procedure
71
72 { MethodType=Event Visibility=Private }
73 Procedure Remove_Object
74 End_Procedure
75
76 { Visibility=Private Obsolete=True }
77 Procedure Request_Clear_All
78 End_Procedure
79
80 { MethodType=Property }
81 Function Current_Record Returns Integer
82 End_Function
83
84 { MethodType=Event Obsolete=True }
85 Procedure New_Current_Record Integer iOldRecord Integer iNewRecord
86 End_Procedure
87
88 Procedure Clear
89 End_Procedure
90
91 Procedure Clear_All
92 End_Procedure
93
94 { MethodType=Property Visibility=Private }
95 Function Is_Superfind_Required Integer iFile Returns Boolean
96 End_Function
97
98 Procedure Establish_Find_Direction Integer eFindMode Integer iFile integer iIndex
99 End_Procedure
100
101 Procedure Locate_Next
102 End_Procedure
103
104 Procedure Read_By_Recnum Integer iFile Integer iRecnum
105 End_Procedure
106
107 Procedure Find_By_Recnum Integer iFile Integer iRecnum
108 End_Procedure
109
110 Procedure Request_Read Integer eFindMode Integer iFile integer iIndex
111 End_Procedure
112
113 Procedure Request_Find Integer eFindMode Integer iFile integer iIndex
114 End_Procedure
115
116 Procedure Request_Superfind Integer eFindMode Integer iFile integer iField
117 End_Procedure
118
119 Procedure Request_Entry_Update Integer iFile Integer eUpdate
120 End_Procedure
121
122 Procedure Rebuild_Constraints
123 End_Procedure
124
125 Function Request_Validate Returns Boolean
126 End_Function
127
128 { MethodType=Property }
129 { DesignTime=False }
130 Procedure Set Main_File Integer iFile
131 End_Procedure
132
133 { Visibility=Private Obsolete=True }
134 Procedure Main_File_Changed Integer Arg1
135 End_Procedure
136
137 { MethodType=Property }
138 Function Main_File Returns Integer
139 End_Function
140
141 Procedure Constrain
142 End_Procedure
143
144 { MethodType=Property Visibility=Private }
145 Function Find_Server Returns Integer
146 End_Function
147
148 { MethodType=Property Visibility=Private }
149 Function Locate_Server Returns Integer
150 End_Function
151
152 { Visibility=Private }
153 Procedure Mark_As_Component
154 End_Procedure
155
156 { MethodType=Event }
157 Procedure Creating
158 End_Procedure
159
160 { MethodType=Event Visibility=Private }
161 Procedure Destroying
162 End_Procedure
163
164 { MethodType=Event }
165 Procedure Deleting
166 End_Procedure
167
168 { MethodType=Event }
169 Function Validate_Delete Returns Integer
170 End_Function
171
172 { MethodType=Event }
173 Function Validate_Delete_No_Cascade Returns Integer
174 End_Function
175
176 Procedure Operation_Not_Allowed Integer iError
177 End_Procedure
178
179 Procedure Request_Delete
180 End_Procedure
181
182 { Visibility=Private Obsolete=True }
183 Procedure Display
184 End_Procedure
185
186 { Visibility=Private Obsolete=True }
187 Procedure Clear_Ui
188 End_Procedure
189
190 { Visibility=Private Obsolete=True }
191 Procedure Display_UI
192 End_Procedure
193
194 Procedure Request_Assign Integer iFile
195 End_Procedure
196
197 { MethodType=Event }
198 Function Validate_Save Returns Integer
199 End_Function
200
201 Procedure Request_Save
202 End_Procedure
203
204 { MethodType=Event }
205 Procedure Backout
206 End_Procedure
207
208 { MethodType=Event }
209 Procedure Update
210 End_Procedure
211
212 { Visibility=Private Obsolete=True }
213 Procedure Entry_Display Integer Arg1 Integer Arg2
214 End_Procedure
215
216 { Visibility=Private Obsolete=True }
217 Procedure Entry_Update Integer Arg1 Integer Arg2
218 End_Procedure
219
220 { Visibility=Private Obsolete=True }
221 Procedure Entry_Clear Integer Arg1
222 End_Procedure
223
224 { Visibility=Private Obsolete=True }
225 Procedure Entry_Clear_All Integer Arg1
226 End_Procedure
227
228 { MethodType=Event }
229 Procedure Save_Main_File
230 End_Procedure
231
232 { MethodType=Event }
233 Procedure Delete_Main_File
234 End_Procedure
235
236 { MethodType=Event }
237 Procedure Attach_Main_File
238 End_Procedure
239
240 { MethodType=Event }
241 Procedure Relate_Main_File
242 End_Procedure
243
244 { MethodType=Property }
245 Function Read_Only_State Returns Boolean
246 End_Function
247
248 { MethodType=Property }
249 { InitialValue=False }
250 { Category=Data }
251 Procedure Set Read_Only_State Boolean bReadOnly
252 End_Procedure
253
254 { MethodType=Property }
255 Function No_Delete_State Returns Boolean
256 End_Function
257
258 { MethodType=Property }
259 { InitialValue=False }
260 { Category=Data }
261 Procedure Set No_Delete_State Boolean bNoDelete
262 End_Procedure
263
264 { MethodType=Property Obsolete=True }
265 Function Entry_Permissive_State Returns Boolean
266 End_Function
267
268 { MethodType=Property Obsolete=True }
269 { DesignTime=False }
270 Procedure Set Entry_Permissive_State Boolean bPermissive
271 End_Procedure
272
273 { MethodType=Property }
274 { InitialValue=-1 }
275 { Category=Data }
276 Procedure Set Ordering Integer iIndex
277 End_Procedure
278
279 { MethodType=Property }
280 Function Ordering Returns Integer
281 End_Function
282
283 { Obsolete=True }
284 Procedure Attach_Server Handle hoServer
285 End_Procedure
286
287 Procedure Detach_Server Handle hoServer
288 End_Procedure
289
290 { Visibility=Private }
291 Procedure Attach_Client Integer hoServer
292 End_Procedure
293
294 { Visibility=Private }
295 Procedure Detach_Client Integer hoServer
296 End_Procedure
297
298 Procedure Add_User_Interface Handle hoDEO
299 End_Procedure
300
301 Procedure Remove_User_Interface Handle hoDEO
302 End_Procedure
303
304 { MethodType=Property }
305 Function Data_Set_Server integer iItem Returns Handle
306 End_Function
307
308 { MethodType=Property }
309 Function Data_Set_Client Integer iItem Returns Handle
310 End_Function
311
312 { MethodType=Property }
313 Function Data_Set_User_Interface Integer iItem Returns Handle
314 End_Function
315
316 { MethodType=Property }
317 Function Data_Set_Server_Count Returns Integer
318 End_Function
319
320 { MethodType=Property }
321 Function Data_Set_Client_Count Returns Integer
322 End_Function
323
324 { MethodType=Property }
325 Function Data_Set_User_Interface_Count Returns Integer
326 End_Function
327
328 { Visibility=Private Obsolete=True }
329 Procedure Add_Parent_File Integer Arg1
330 End_Procedure
331
332 { Visibility=Private Obsolete=True }
333 Procedure Remove_Parent_File Integer Arg1
334 End_Procedure
335
336 { MethodType=Property Visibility=Private Obsolete=True }
337 Function Parent_File_Count Returns Integer
338 End_Function
339
340 { MethodType=Property Visibility=Private Obsolete=True }
341 Function Parent_File Integer Arg1 Returns Integer
342 End_Function
343
344 { MethodType=Property Visibility=Private Obsolete=True }
345 Procedure Set Find_Permissive_State Integer Arg1
346 End_Procedure
347
348 { MethodType=Property Visibility=Private Obsolete=True }
349 Function Find_Permissive_State Returns Integer
350 End_Function
351
352 { MethodType=Event Visibility=Private Obsolete=True }
353 Procedure Transaction_Aborted Integer Arg1
354 End_Procedure
355
356 Function Validate_Constraints Returns Boolean
357 End_Function
358
359 { MethodType=Property }
360 Function Which_Data_Set Integer iFile Returns Handle
361 End_Function
362
363 Procedure Request_Relate Integer iFile
364 End_Procedure
365
366 { MethodType=Property Visibility=Private Obsolete=True }
367 Function Suggested_Ordering Returns Integer
368 End_Function
369
370 { MethodType=Property Visibility=Private Obsolete=True }
371 Procedure Set Suggested_Ordering Integer iIndex
372 End_Procedure
373
374 { MethodType=Property }
375 Function No_Relate_State Returns Boolean
376 End_Function
377
378 { MethodType=Property }
379 { InitialValue=False }
380 { Category=Data }
381 Procedure Set No_Relate_State Boolean bNoRelate
382 End_Procedure
383
384 { MethodType=Property }
385 Function Can_Delete Returns Boolean
386 End_Function
387
388 Procedure Refind_Records
389 End_Procedure
390
391 { MethodType=Event }
392 Procedure Clear_Main_File
393 End_Procedure
394
395 Procedure Request_Clear_File Integer iFile
396 End_Procedure
397
398 { MethodType=Property Visibility=Private }
399 Procedure Set Always_Refresh_State Boolean bAlways
400 End_Procedure
401
402 { MethodType=Property Visibility=Private }
403 Function Always_Refresh_State Returns Boolean
404 End_Function
405
406 { MethodType=Event }
407 Procedure Reset_Filemodes_For_Lock
408 End_Procedure
409
410 { MethodType=Property }
411 { InitialValue=False }
412 { Category=Data }
413 Procedure Set Smart_Filemode_State Boolean bSmart
414 End_Procedure
415
416 { MethodType=Property }
417 Function Smart_Filemode_State Returns Boolean
418 End_Function
419
420 { MethodType=Property }
421 { EnumList="DF_Filemode_Default, DF_Filemode_Original, DF_Filemode_ReadOnly, DF_Filemode_Single_User" }
422 { InitialValue=DF_Filemode_Original }
423 { Category=Data }
424 Procedure Set Smart_Filemode_For_Lock Integer eMode
425 End_Procedure
426
427 { MethodType=Property }
428 Function Smart_Filemode_For_Lock Returns Integer
429 End_Function
430
431 { MethodType=Property }
432 { EnumList="DF_Filemode_Default, DF_Filemode_Original, DF_Filemode_ReadOnly, DF_Filemode_Single_User" }
433 { InitialValue=DF_Filemode_ReadOnly }
434 { Category=Data }
435 Procedure Set Smart_Filemode_For_No_Lock Integer eMode
436 End_Procedure
437
438 { MethodType=Property }
439 Function Smart_Filemode_For_No_Lock Returns Integer
440 End_Function
441
442 { MethodType=Property }
443 { InitialValue=True }
444 { Category=Data }
445 Procedure Set Cascade_Delete_State Boolean bCascade
446 End_Procedure
447
448 { MethodType=Property }
449 Function Cascade_Delete_State Returns Boolean
450 End_Function
451
452 Procedure Add_Client_File Integer iFile
453 End_Procedure
454
455 Procedure Remove_Client_File Integer iFile
456 End_Procedure
457
458 { MethodType=Property }
459 Function Client_File_Count Returns Integer
460 End_Function
461
462 { MethodType=Property }
463 Function Client_File Integer iItem Returns Integer
464 End_Function
465
466 Procedure Add_Server_File Integer iFile
467 End_Procedure
468
469 Procedure Remove_Server_File Integer iFile
470 End_Procedure
471
472 { MethodType=Property }
473 Function Server_File_Count Returns Integer
474 End_Function
475
476 { MethodType=Property }
477 Function Server_File Integer iItem Returns Integer
478 End_Function
479
480 { MethodType=Property }
481 { InitialValue=True }
482 { Category=Data }
483 Procedure Set pbAutoFillFromFirst Boolean bFillFromFirst
484 End_Procedure
485
486 { MethodType=Property }
487 Function pbAutoFillFromFirst Returns Boolean
488 End_Function
489
490 { MethodType=Property }
491 { InitialValue=True }
492 { Category=Data }
493 Procedure Set pbInheritConstraints Boolean bInherit
494 End_Procedure
495
496 { MethodType=Property }
497 Function pbInheritConstraints Returns Boolean
498 End_Function
499
500 Function CurrentRowId Returns RowId
501 End_Function
502
503 Function HasRecord Returns Boolean
504 End_Function
505
506 Procedure FindByRowId integer iFile RowId riRowId
507 End_Procedure
508
509 Procedure ReadByRowId integer iFile RowId riRowId
510 End_Procedure
511
512 { MethodType=Event }
513 Procedure OnNewCurrentRecord RowId riOldRowId RowId riNewRowId
514 End_Procedure
515
516#ENDIF
517
518end_class
519
520#COMMAND dsStart R R
521 FORWARD_BEGIN_CONSTRUCT !1 !2 !3 !4 !5 !6 !7 !8 !9
522 Bind_Main_File !3 !4 !5 !6 !7 !8 !9
523 Bind_Index !3 !4 !5 !6 !7 !8 !9
524 Bind_Updating !3 !4 !5 !6 !7 !8 !9
525#ENDCOMMAND
526
527#COMMAND bind_main_file // this should not be used anymore
528 #IF (!0>1)
529 #IFSAME !1 MAIN_FILE
530 #ERROR DFERR_COMP_OBSOLETE_UNSUPPORTED_FEATURE "Main_file object syntax is no longer supported. Use Set Main_file instead."
531 //#IFDEF !2.RECNUM
532 //#PUSH !u
533 //#SET U$ !2.RECNUM
534 //set main_file to |CI!u
535 //#POP u$
536 //#ELSE
537 //#ERROR DFERR_COMPILE If !2 is a file it is unopened
538 //#ENDIF
539 #ELSE
540 bind_main_file !2 !3 !4 !5 !6 !7 !8 !9
541 #ENDIF
542 #ENDIF
543#ENDCOMMAND
544
545#COMMAND bind_index
546 #IF (!0>1)
547 #IFSAME !1 BY
548 #ERROR DFERR_COMP_OBSOLETE_UNSUPPORTED_FEATURE "By Index object syntax is no longer supported. Use Set Ordering instead."
549 //set ordering to !2
550 #ELSE
551 bind_index !2 !3 !4 !5 !6 !7 !8 !9
552 #ENDIF
553 #ENDIF
554#ENDCOMMAND
555
556#COMMAND Bind_Updating
557 #IF (!0>1)
558 #IFSAME !1 UPDATING
559 #ERROR DFERR_COMP_OBSOLETE_UNSUPPORTED_FEATURE "Updating object syntax is no longer supported. Use Set DDO_Server instead."
560 //SetDependents !2 !3 !4 !5 !6 !7 !8 !9
561 #ELSE
562 Bind_Updating !2 !3 !4 !5 !6 !7 !8 !9
563 #ENDIF
564 #ENDIF
565#ENDCOMMAND
566
567
568
569