Book: Clarion Tips & Techniques Volume 4 (PDF)
Our massive 650+ page Clarion Tips & Techniques Volume 4 is now available as a downloadable PDF!
Download the files
Table of Contents
Browses and Forms
Internationalization Tools Standards: Learning from an ABC Calendar Workaround * 3
ABC Calendar Class 5
Multi-language class workaround 7
Applying the multi-language ABC calendar 9
Translation file (PDABCCal.trn) 9
User interface file (ABUtilui.clw) 10
Sample application 10
Preferences 11
The AddLanguage procedure 12
DateForm 13
Conclusion 15
Completely Dynamic Listbox Formatting? * 17
Selection criteria 18
Sort options 19
The multi-tabbed browse 21
Multiple format strings 25
Summary 27
Edit-In-Place: Getting User Confirmation * 29
Those clever users 30
Asking the user 31
The embeds 33
TakeEvent 35
An alternate approach 36
Conclusion 37
Updating Hot Fields * 39
Trials and errors 42
Record Not Available and browse architecture 43
Planting palm firmly on forehead 43
One solution 44
Summary 46
Aesthetically Pleasing Recursive Updates * 47
Recursive updates 48
Recursive Inserts 51
SELF.BatchProcessing 53
Summary 53
Beautifying Clarion Applications * 55
Highlighting prompts and lists 56
Redrawing controls 58
The DrawGlassPanel procedure 59
Drawing the line(s) 60
Dropping a shadow 61
Getting a head(er) 61
Adding to your body count 63
The end of the line 63
Make up 65
The template 65
Conclusion 66
Replicating IDLE: Throwing Users Out * 67
But Wait! 68
TakeEvent 69
Doing the dirty 70
Who Did What? 71
Summary 72
Throwing Users Out: Methods of Computation * 73
But first, the assumptions 74
And now, another assumption 74
Time of day 75
Countdown 76
Count up 78
But wait! There’s more! 78
Recursive Adds * 81
The default option 83
Buttons on the browse 84
Under the bonnet 85
And now, back to our show 86
Buttons on the form 88
Summary 90
A Survey Of Embed Usage * 91
A storage problem 92
The schema 92
Parsing TXAs 94
Procedure types 94
The embeds 99
Event embeds 105
WindowManager method embeds 106
Browse embeds 110
Process/Report embeds 112
Embeds by procedure type 112
Conclusions and recommendations 125
Another Single Browse For Multiple Lookups * 129
The browse code 130
The extension template 132
Features to be added 139
Summary 139
An Economical Record Status Control * 141
The template 143
Features to be added 147
Using the template 147
Summary 147
A Template Debugger * 149
The Ingredients 150
Adding ODS Messages to Templates 151
Conclusion 152
A Class Wrapper for the SimpleOCR API * 155
SimpleOCR 156
Class wrapper 156
Callbacks 158
Character recognition 159
Improving On The Non-Related Lookup Template * 163
Using the stock template 163
Adding functionality 165
The code template 166
Summary 169
Global Variables, Threads, Critical interSections and the Dangers of Unprotected Sets * 173
Common misconceptions 174
From bad to worse 176
Practicing safe sets 178
There’s gotta be a better way 183
Acknowledgements, thus far 183
A Global Variables Protection Class * 185
SetGlobal method 186
GetGlobal method 188
Testing 189
A Template wrapper 196
Putting it all together 198
Acknowledgements 198
Classes For Background Processes * 201
A background procedure 202
Almost STARTing a class 203
The example 204
Constructors, destructors, and GPFs 207
Thread safety 209
Summary 209
When START Starts * 211
Controlling START 211
Resume 213
Summary 214
Using DOS Files To Send Printer Codes * 219
The lowly DOS file 220
Sending commands 221
USB printers 222
Summary 222
Printing A Tree From A Page Loaded Browse * 223
A dialogue tree 224
The tree design 225
Printing the tree 227
Getting started on coding 228
Adding the content 234
Printing Unknown Queue Fields * 239
Who()?, What()? 240
Printing a “No Records” Report * 243
Step 1: Add the detail band 243
Step 2: Set the band filter 244
Step 3: Open the report 245
Step 4: Modify AbReport.Inc 246
Step 5: Set OpenReport’s result to 0 247
Step 6: Set SELF.Response 247
Other considerations 247
Step 7 248
Summary 248
Writing To A Printer Port: Sending Escape Codes * 249
Forward to the past 252
CreateFile 253
WriteFile 255
CloseHandle 256
The Sample App 256
Summary 257
Print Directly to Printer Made Easier * 259
A single call 260
The source procedure 261
The Easiest Way To Write To A Printer Port * 263
The Nova Templates 263
Winevent 265
Summary 266
Direct-To-USB Printing * 267
USB need not apply 268
DEVCON to the rescue 269
Caveats 271
Summary 271
Whitemarsh’s Use Of Mimer With Clarion * 275
Getting Mimer 275
Clarion & Mimer 276
Using the SQL Advanced Tab * 279
MS SQL Server and Sample Database 282
What properties? 282
Regular Totaling - retiring ResetFromView 282
PROP:Name 284
PROP:GROUPBY 285
PROP:HAVING 285
SQL() and PROP:ORDER 286
Why not just use PROP:SQL then? 286
PROP:WHERE 287
Summary 288
Creating SQL From XML With XSLT * 289
An XML template language 290
Transformation 290
Tools 290
Where to start? 292
What about Clarion? 299
Calling XSLT Code From Clarion * 301
Transforming the easy way 304
Creating an OLE object in C# 304
Finally, Clarion! 308
Where to next? 312
Resources: 312
External Business Rules with the In-Memory Driver * 315
The basics of business rules 316
Code changes to the template 323
Summary 328
Using SQLIdentity in Clarion 6 * 329
The problem 330
Getting the primary key value 330
Summary 335
Multi-User Primary Keys: A Solution * 337
A solution 338
Step 1 ñ Create the PrimaryKeys table 340
Step 2 - Create two stored procedures 340
Step 3 - Add starting values 341
Step 4 - Create a Clarion source procedure 341
Step 5 - Remove autoinc 343
Step 6. Remove IDENTITY 343
Step 7 ñ Add the extension template 343
Embedding The SQLite Engine In Clarion Applications * 345
What SQLite is and is not 346
Topspeed/SQLite performance comparisons 346
So, will you ever get to use it? 348
SQLite class quick start 349
Inside the supplied SQLite Class 351
Conclusion 354
PROP:SQL And Embedded Single Quotes * 357
The problem with QUOTE 357
The example app 360
Summary 361
Encryption and Application Signing * 365
What is a digital certificate? 366
Who is it? 367
Who vouches for that? 368
What is the entity’s encryption code? 369
Symmetric encryption 369
Upside and Downside of Symmetric Encryption 371
Asymmetric Encryption 371
Encryption 372
Signing 373
Combining Public/Private Keys with Symmetric Keys 375
Next time 376
Signing Your Applications * 377
Your digital certificate 377
The Signing Software 379
Signing your code using the wizard 380
Verifying the Signature 385
Signing your code by batch file 386
Creating the Batch file 387
Conclusion 388
Additional Reading 389
Signing Your Applications: New Challenges * 391
A little background 392
Turning it off manually 393
Turning it off with code 396
Turning it off granularly 396
All users? 398
An end run - my application only 398
For SetupBuilder users 401
As for “real” networks * 401
Miscellaneous security annoyances 402
Conclusion 404
Additional Reading 404
Source code 405
Manifests for Hand Coded Apps * 407
Manifest destiny 408
From the editor 411
Source code 412
Get Ahead Of Your Competition With Vista And Office 2007 * 413
Rose colored glasses 414
Ok, wise guy * 414
A not-so-short Clarion bedtime story 415
Payday 416
The good part? 417
The point 417
Rub your hands together 417
The bigger picture 418
Vista-Compliant INI Files * 419
INI folders 420
The VistaINIClass 420
The template 423
Viewing CSIDL values 424
Summary 424
Source code 424
Running C6 on Vista * 425
Fixing clipped text 425
Fixing WinHlp32.exe 426
An Introduction to CVS and WinCVS * 429
What is CVS? 430
Installing WinCVS 432
Installing Python 432
Terminology 432
Running WinCVS for the first time 433
Start with Checkout 438
Commit changed files 440
CVS, WinCVS and Clarion * 443
Filters 443
Change logs 445
File status 447
Revision graphs 448
Version numbers 450
Tips 450
Summary 451
Recommended reading: 452
Version Control with CVS and Clarion 6.x * 453
The software 454
SoftVelocity versions and hotfixes 455
Tagging a product release (version) 460
Modules 461
Release 463
Branching Out 464
Bug FIX! 467
Version Control with CVS and Clarion 6.x, Part 2 * 471
CVSNT Install on Red Hat Fedora Core 3 472
WinCVS install and configuration 473
Configure applications and directories 474
Directory Structure 481
Reasons to use WinCVS rather than Clarion 484
Administration, automatisation 485
Tools, ideas 486
Source code 487
Understanding The Clarion 6 Version Control Interface * 489
The Clarion 6 Version Control System 490
The in and outs of Clarion 6’s VCS system 491
Details of operation 494
Exporting module TXAs 498
Summary 498
Using MS Visual Source Safe With Clarion * 501
Installation 502
Setup 502
Adding files 504
Sharing code 505
Checking out code 507
Getting the latest version 509
Summary 511