Introduction
The ABC classes contain a number of properties which
govern how the classes behave. Some of these properties are not exposed at
the template level making them hard to set for an application in a global
fashion.
This simple template allows you to set some of these properties more
easily.
All the proceeds collected from this template go to charity (over and
above our normal charitable contributions.) For a list of the charities we
regularly support see our
Social
Responsibility page. If you cannot afford this product please
contact us and we will arrange a free copy for you.
If you encounter any other ABC properties which would benefit from being
set globally please do not hesitate to contact us.
Features
- FileManager.DoNotAssertOnCloseMisuse
property (Clarion 10 or later only)
There is an ASSERT in the FileManager class which prevents a developer
from calling CLOSE on a table. This ASSERT returns false positives
when the CLOSE is legally called after an OPEN. This property exists
to suppress this ASSERT, but there is no way of setting it globally
from the template. (*Included in FM3)
- FileManager.Create property (for all SQL
tables).
By default if the FileManager.Open is called, and a File Not Found
error is returned, then the CREATE statement is called. CREATE deletes
the existing table before creating a new one.
For SQL tables this behavior is problematic because the Open can
return a File Not Found error erroneously. The solution is to turn off
this CREATE ability (it's a property setting in the class) for all SQL
tables. (*Included in FM3)
*Included in FM3 -- If you have got the FM3
Global Extension in the app then this setting is already being set by the
FM3 DLL and you do not need this template to set this property.
Warning : DoNotAssert...
SoftVelocity have asked me to point out that embedding
any code in your program can result in bugs in the program.
Specifically using the CLOSE statement after
a FileManager.Open (like Access:Customers.Open)
can result in the table being closed. The FileManager
class lacks the code to detect this change and hence this could
lead to unexpected behavior in your program. The ASSERT
being suppressed detects this misuse. (Unfortunately it also
incorrectly detects perfectly legal usage as being bad causing a false
positive, which is why the property to suppress it has been added to the FileManager class in the first place.)
If you set this property then you are of course responsible for writing
correct usage of CLOSE, limiting it to places
where there is a matching OPEN.
JumpStart
- Add Global Extension
- Set the properties as you wish. See the Template
Reference for a list of properties and what they do.
Multi DLL
If you have a multi-dll system (ie multiple apps) then
you only need to add this template to the DataDLL app. ie the app which
contains the ABC classes.
Template
GlobalABCDefaults Template
File Manager Tab
DoNotAssertOnCloseMisuse
The default value for this is ON. If this is on then the buggy ASSERT
when CLOSE is called is suppressed.
Create SQL Tables
The default value for this is OFF. If this is ON then a CREATE will be
called for SQL tables which have an error on OPEN. Note that if you are
using File Manager 3 then this setting should still be set to OFF, FM3
will correctly create the tables when required - and only when required.
Support
Your questions, comments and suggestions are welcome.
See our web page (
www.capesoft.com)
for new versions. You can also contact us in one of the following ways:
CapeSoft Support |
Email |
|
Telephone |
+27 87 828 0123 |
Fax |
+27 21 715 2535 |
Post |
PO Box 511, Plumstead, 7801, Cape Town, South Africa |
Installation
To download the latest installation please visit the
CapeSoft
Downloads page.
To install extract the Installation Program from the SAF file using the
free CapeSoft Safe Reader (download for free from
http://www.capesoft.com/utilities/Safe/safereader.htm).
Run the Installation Program for your version of Clarion.
Distribution
There are no files to distribute.
License & Copyright
This template is copyright © 2021 by CapeSoft
Software. None of the included files may be distributed. Your programs
which use ABCDefaults can be distributed without any ABCDefaults
royalties.
This product is provided as-is. Use it entirely at your own risk. Use of
this product implies your acceptance of this, along with the recognition
of the copyright stated above. In no way will CapeSoft Software, their
employees or affiliates be liable in any way for any damages or business
losses you may incur as a direct or indirect result of using this product
Version History
Version 1.05 (24 May 2021)
- Add: Clarion 11.1 to install.
Version 1.04 (14 September 2018)
- Add: Clarion 11 to install.
Version 1.03 (10 November 2017)
- Fix: Setting Create property in INIT method caused a GPF when files
were set to be generated in Local Modules, because the FILE is
instantiated AFTER the FileManager (so prop:SqlDriver is not in
scope).
Version 1.02 (10 September 2015)
(Critical Update!!)
- Fix: Setting of "Create" property to 0 failed because the Create
property is reset in the UseFile method.
Version 1.01 (3 September 2015)
- Changed default setting of "Create SQL Tables" from ON to OFF.
- Corrected documentation of "Create SQL Tables" Switch.
Version 1.0 (26 June 2015)
Download latest version
here