-
Notifications
You must be signed in to change notification settings - Fork 0
/
ventekweb_BC0.CLW
executable file
·98 lines (69 loc) · 2.72 KB
/
ventekweb_BC0.CLW
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
MEMBER('ventekweb.clw')
INCLUDE('ABFILE.INC'),ONCE
MAP
ventekweb_BC0:DctInit PROCEDURE()
ventekweb_BC0:DctKill PROCEDURE()
ventekweb_BC0:FilesInit PROCEDURE()
END
Hide:Access:vendas CLASS(FileManager),TYPE ! FileManager for vendas
Init PROCEDURE(),DERIVED
Kill PROCEDURE(),DERIVED
UseFile PROCEDURE(BYTE UseType = UseType:Uses),BYTE,PROC,DERIVED
END
Hide:Relate:vendas CLASS(RelationManager),TYPE ! RelationManager for vendas
Init PROCEDURE
Kill PROCEDURE(),DERIVED
END
_Hide:Access:vendas &Hide:Access:vendas,AUTO,THREAD
_Hide:Relate:vendas &Hide:Relate:vendas,AUTO,THREAD
ventekweb_BC0:DctInit PROCEDURE()
CODE
_Hide:Access:vendas &= NEW(Hide:Access:vendas)
_Hide:Relate:vendas &= NEW(Hide:Relate:vendas)
Relate:vendas &= _Hide:Relate:vendas
ventekweb_BC0:FilesInit PROCEDURE()
CODE
_Hide:Relate:vendas.Init
ventekweb_BC0:DctKill PROCEDURE()
CODE
_Hide:Relate:vendas.Kill
DISPOSE(_Hide:Relate:vendas)
Hide:Relate:vendas.Init PROCEDURE()
CODE
_Hide:Access:vendas.Init
SELF.Init(Access:vendas,1)
Hide:Access:vendas.Init PROCEDURE
CODE
SELF.Initialized = False
SELF.Buffer &= ven:Record
SELF.FileNameValue = 'vendas'
SELF.SetErrors(GlobalErrors)
SELF.File &= vendas
PARENT.Init
Access:vendas &= SELF
Hide:Access:vendas.Kill PROCEDURE
CODE
PARENT.Kill
Access:vendas &= NULL ! File manager has been destroyed to assign null, it is an error to reference this after this point
Hide:Access:vendas.UseFile PROCEDURE(BYTE UseType = UseType:Uses)
ReturnValue BYTE,AUTO
CODE
IF UseType ~= UseType:Initialize
SELF.UseFile(UseType:Initialize) !Recursive call to ensure initialization takes place
END
IF UseType = UseType:Initialize AND ~SELF.Initialized
SELF.InUseFile = True
SELF.Init(vendas,GlobalErrors)
SELF.Create = 0
SELF.LockRecover = 10
SELF.AddKey(ven:PRIMARY,'ven:PRIMARY',0)
END
!SELF.InUseFile will be set to False in PARENT
ReturnValue = PARENT.UseFile(UseType)
RETURN ReturnValue
Hide:Relate:vendas.Kill PROCEDURE
CODE
_Hide:Access:vendas.Kill ! Kill the file manager
PARENT.Kill
Relate:vendas &= NULL ! Assign NULL to the RelationManager's FileManager reference, it is an error to reference this after this point
DISPOSE(_Hide:Access:vendas) ! destroy the file manager