Documente Academic
Documente Profesional
Documente Cultură
Table of Contents
1
1.1
1.2
Introduction ................................................................................................. 1
Follow up ...................................................................................................... 1
Preparations ................................................................................................. 2
2.1
3
3.1
3.2
3.3
4
4.1
4.2
4.3
4.4
5
Tools ............................................................................................................. 7
Studio ........................................................................................................... 7
Database Builder .......................................................................................... 8
Database Explorer ........................................................................................ 9
3.3.1
Proper use........................................................................................ 12
Workspaces ................................................................................................ 15
Workspace Paths ........................................................................................ 16
Default Database Type ............................................................................... 17
Default files ................................................................................................ 19
The .WS file ................................................................................................ 20
Language .................................................................................................... 23
5.1 History ........................................................................................................ 23
5.2 Source ........................................................................................................ 24
5.2.1
Is DataFlex case sensitive? ............................................................... 24
5.3 Compiling ................................................................................................... 25
5.4 Virtual Machine .......................................................................................... 25
5.5 Syntax ......................................................................................................... 26
5.6 Commands ................................................................................................. 27
5.7 Naming conventions................................................................................... 27
5.8 Variables ..................................................................................................... 28
5.8.1
Types................................................................................................ 29
5.8.2
Struct ............................................................................................... 31
5.8.3
Global............................................................................................... 32
5.8.4
Local ................................................................................................. 33
5.8.5
Constants ......................................................................................... 34
5.9
Assignments ............................................................................................... 37
5.9.1
Assigning a property/function value ................................................ 37
5.9.2
Expression body ............................................................................... 37
5.9.3
Ordering in an expression ................................................................ 41
5.9.4
Short-circuit evaluation ................................................................... 42
5.9.5
Number of parentheses ................................................................... 42
5.10
Process control ...................................................................................... 43
5.10.1
Conditions ................................................................................... 43
5.10.2
Compound statements ............................................................... 48
5.10.3
Looping statements .................................................................... 48
5.11
Procedures & Functions ........................................................................ 52
5.11.1
Terminate and return a value ..................................................... 53
5.11.2
Parameters ................................................................................. 53
5.11.3
Identifiers ................................................................................... 54
5.11.4
Calling ......................................................................................... 55
5.11.5
Registering .................................................................................. 59
6.1
ii
7.1
7.2
Debugger .................................................................................................... 95
Integrated................................................................................................... 95
Breakpoints ................................................................................................ 97
8.2.1
Step over .......................................................................................... 98
8.2.2
Step into .......................................................................................... 98
8.2.3
Step out ........................................................................................... 98
8.3 Call Stack .................................................................................................... 98
8.4 Variables ..................................................................................................... 99
8.5 Message trace .......................................................................................... 100
8.1
8.2
iii
8.5.1
Filters ............................................................................................. 101
8.5.2
Trace file ........................................................................................ 103
8.6 Watches.................................................................................................... 103
8.7 Tables ....................................................................................................... 104
8.8 Modify the source .................................................................................... 105
9
10
iv
10.8.2
11
12
12.5
Constraints/Filters ............................................................................... 171
12.5.1
Constraint_Set .......................................................................... 171
12.5.2
Filter values .............................................................................. 172
12.5.3
Constrained_Find operation ..................................................... 174
12.5.4
Constrain_Found_Count & Constrain_Tests_Count ................. 175
13
14
15
vi
15.3
Encapsulation ...................................................................................... 211
15.4
Methods .............................................................................................. 212
15.4.1
Public vs. Private....................................................................... 212
15.4.2
Instance inheritance ................................................................. 212
15.5
The parent object ................................................................................ 214
15.6
Properties............................................................................................ 214
15.6.1
Meta Data ................................................................................. 216
15.6.2
Getting the value of a property ................................................ 217
15.6.3
Assigning a value to a property ................................................ 218
15.6.4
Complex properties .................................................................. 218
15.6.5
Arrays ....................................................................................... 219
15.6.6
Structs....................................................................................... 220
16
vii
16.10.1
16.10.2
16.10.3
16.10.4
16.10.5
16.10.6
17
18
Resize........................................................................................................281
18.1
Using the Anchors feature .................................................................. 282
18.2
Minimum and Maximum Size ............................................................. 284
18.3
OnResize.............................................................................................. 285
18.4
Column Resizing .................................................................................. 286
viii
19
20
21
ix
21.4.3
Current_Item ............................................................................ 356
21.4.4
Item_Count ............................................................................... 357
21.5
Dynamic_Update_State ...................................................................... 357
21.6
Base Controls ...................................................................................... 358
21.7
Data Aware Controls ........................................................................... 360
21.8
Base Containers................................................................................... 362
21.9
Data Aware Containers ....................................................................... 363
21.10
Dialogs ................................................................................................. 364
21.11
Internet ............................................................................................... 364
21.12
Others ................................................................................................. 365
21.13
Menus and Toolbars............................................................................ 367
22
23
23.2.2
23.2.3
24
25
xi
25.5.2
25.5.3
26
27
Messages ..................................................................................................467
27.1
Focus tree ............................................................................................ 467
27.2
Focus ................................................................................................... 469
27.2.1
ContainsFocus ........................................................................... 470
27.3
Self ...................................................................................................... 470
27.4
Activate ............................................................................................... 470
27.4.1
Activating .................................................................................. 471
27.5
Popup objects ..................................................................................... 472
27.6
Deactivate ........................................................................................... 472
27.6.1
Deactivating .............................................................................. 472
27.7
Entering ............................................................................................... 473
27.7.1
OnSetFocus ............................................................................... 474
27.8
Exiting .................................................................................................. 474
27.8.1
OnKillFocus ............................................................................... 475
27.9
Next focus object ................................................................................ 475
27.9.1
Next_Focus ............................................................................... 475
xii
27.9.2
Next_Object_Id ........................................................................ 476
27.9.3
Next message ........................................................................... 476
27.10
Prior focus object ................................................................................ 476
27.10.1
Prior_Focus ............................................................................... 477
27.10.2
Prior_Object_Id ........................................................................ 477
27.10.3
Previous message ..................................................................... 477
27.11
Scope_State ........................................................................................ 478
27.11.1
Entering_Scope......................................................................... 478
27.11.2
Exiting_Scope ........................................................................... 479
27.12
Client_Area_State ............................................................................... 479
27.12.1
Next_Level / Previous_Level..................................................... 479
27.13
Ring_State ........................................................................................... 481
27.13.1
OnChildWrapping ..................................................................... 481
27.14
Enabled_State ..................................................................................... 481
27.14.1
Shadow_Display ....................................................................... 482
27.15
Visible_State ....................................................................................... 482
27.16
Skip_State ........................................................................................... 483
27.17
Focus_Mode........................................................................................ 483
27.18
Active_State ........................................................................................ 484
27.19
Delegation & the importance of Container Objects ............................ 484
28
29
xiii
29.1.3
Timer messages ........................................................................ 502
29.2
cIdleHander ......................................................................................... 502
30
Templates .................................................................................................513
30.1
Config folder........................................................................................ 513
30.2
Create new template .......................................................................... 513
30.3
Templates.xml ..................................................................................... 517
31
32
33
Reporting ..................................................................................................539
33.1
Report View......................................................................................... 539
33.2
BasicReport ......................................................................................... 539
33.2.1
Employees Report..................................................................... 539
33.2.2
Employees per Department Report .......................................... 550
33.3
WinPrint .............................................................................................. 556
xiv
33.3.1
The Functions List Report ......................................................... 556
33.4
Crystal Reports .................................................................................... 561
33.4.1
The object ................................................................................. 561
33.4.2
The wizard ................................................................................ 561
33.4.3
The Visual Result ...................................................................... 567
33.4.4
The Report Object .................................................................... 568
33.4.5
Pathing ..................................................................................... 571
33.4.6
Running multiple reports.......................................................... 572
34
35
36
37
xv
37.2
INI Files ................................................................................................ 597
37.2.1
Accessing an INI file .................................................................. 598
37.2.2
Reading from the INI file ........................................................... 598
37.2.3
Writing to the INI file ................................................................ 599
38
39
Deployment ..............................................................................................609
39.1
Visual DataFlex .................................................................................... 609
39.2
Crystal Reports .................................................................................... 609
xvi