August 23, 2005
When creating an association in ECO you are not guaranteed the order in which the objects at the end of the association will be presented. For this reason ECO provides a...
August 15, 2005
Not only is Application.ProcessMessages quite long to type, often extra functionality needs to be called when its used. To this end I have created two basic wrappers which...
August 14, 2005
In this article I’ll use the term “Identity” interchangeably to note Auto generated (from RDMS) values usually for a column representing the primary key of a table. These...
August 9, 2005
You will need the function in this article (http://www.howtodothings.com/ViewArticle.aspx?Article=760) to get this working properly
function ParamExists(const ParamName: string):...
August 9, 2005
(* GetParameterValue
GetParameterValue will return the value associated with a parameter name in the form of
/paramname:paramvalue -paramname:paramvalue
and
/paramname -paramname
...
August 9, 2005
function GetFileSize(const FileName: string): Integer; var sr: TSearchRec; begin Result := 0;
if FindFirst(FileName, faAnyFile, sr) = 0 then begin...
August 9, 2005
Have you ever found yourself adding the same code to different forms? Well now you can use the following as a base class for all forms.
=============== BEGIN...
August 9, 2005
Personally I find both the WinAPI MessageBox and Application.MessageBox and MessageDlg functions cludgy and always add the following function to every app.
function MsgBox(const...
August 9, 2005
The following function will attempt to remove the read only flag on a file, you will need the function in this article (http://www.howtodothings.com/ViewArticle.aspx?Article=755).
...
August 9, 2005
The following function will return True if a file is read only.
function IsReadOnly(const FileName: string): Boolean; var sr: TSearchRec; begin (* Assume not read...
August 3, 2005
This is just a quick set of instructions rather than a comprehensive article. It is a copy of a posting I made in a Borland newsgroup...
I'll give you an example of one...
July 17, 2005
This article demonstrates the basics of how to store and retrieve a Bitmap in an ECO variable.
First create an ECO variable in the class you wish to hold the bitmap, for example:
...
June 27, 2005
With the help of Jonas Hogstrom and Jan Nordén I have written 2 functions to evaluate OCL.First is to evaluate OCL in EcoSpace: public object EvaluateOclInEcoSpace(IElement...
April 21, 2005
Here is an example of using different TableStyles depending on the type of the currently selected object in a DataGrid. I have 2 grids, each hooked to ExpressionHandles. I...
April 20, 2005
ECO allows you to add TaggedValues (name/value pair) to your model at design time. Here is how to retrieve the value of a TaggedValue at runtime.
obj.AsIObject() gives IObject...
April 9, 2005
This article will explain derived members in ECO. It's primary purpose is to describe the difference between the ReEvaluateSubscriber and ReSubscribeSubscriber parameters...
April 9, 2005
The application we are going to build can be used for capturing worktime and breaks during the worktime. The worktime can be captured with multiple clients and the server application...
April 7, 2005
ECO II has a new feature in Update 2 which makes it easier to see what it is doing behind the scenes.
When you run your app you can look in the messages window of the Delphi IDE...
March 15, 2005
As of D2005 udpate #2 there is a new helper class in the ECO framework named MaxLengthSupportFunctions.
Normally when you databind an EditBox for example to an ECO object you...
March 15, 2005
If you have ever tried reading constraints from an ECO model you have probably noticed by now that there are lots of auto-generated multiplicity constraints.
I personally like...
February 26, 2005
Before updating the database with changes to your objects it is wise to check that the object is in a valid state first. ECO allows you to model constraints against your...
February 10, 2005
procedure THtmlMailForm.SendButtonClick(Sender: TObject);begin if FRunning then begin MessageBeep(MB_OK); Display('**** ALREADY RUNNING ****'); Exit; end;
FRunning := TRUE; try {...
February 10, 2005
In a form etc we can evaluate OCL in the DB by using an OclPSHandle, but how do you evaluate OCL in the DB in code?
This tip thanks to Jan Norden from Borland. IOclService oclService...
February 1, 2005
This article will demonstrate how to use code derived associations to implement user-defined class constraints.
Code derived association is derived association without provided...
January 3, 2005
Simple means of making some components data-aware. Alternative data-aware checkboxes (and radiobuttons) that can be arranged more flexibly.
Although more recent versions of Delphi...
January 3, 2005
How do we databind the information from the ExpressionHandle or other handle type into the ASP.NET Repeater control? Took a little double take viewing, but Pete Morris kindly...
December 10, 2004
This article explains the pitfalls of inheritance, and offers a solution...
In this article I will have to use some ficticious class names etc due to the sensitivity of the project...
December 9, 2004
This article demonstrates a simple example of using recusive OCL within a composite pattern.
"To understand recursion we must first understand recursion" [Source unknown]
Surely...
December 3, 2004
Explains what Code Derived Columns are, and how to use them.
The focus of this article will be "Event derived columns". Jan Nordén (Borland) pointed me in...
November 15, 2004
Controlling your Library Path can be benefitial for a number of reasons, easy reading, sharing network components/libraries, or even for escrowing projects.
There is a relatively...
November 7, 2004
Implementing Shell Search Handler using Delphi
The Shell supports several search utilities that allow users to locate namespace objects such as files or printers. You can create...
September 14, 2004
Howto store the contents of a RichEdit in an EMF files
Sometimes, you may want to store the contents of a rich edit control in a metafile. This article outlines an approach that...
August 23, 2004
This article describes a simple way to set left and right channel volumes separately.
Changing Left and Right channel volumes separately:
By : Pooia LalbakhshMS in Computer Engineering
These...
August 10, 2004
This example shows how to send HTML emails using Delphi and Indy, with embedded images.
uses idMessage;procedure TForm1.Button1Click(Sender: TObject);var html: TStrings; ...
July 9, 2004
Password authentication is used in many systems for authenticating the identity of one or both peers of a connection. This paper will help you design more secure password authentication...
May 20, 2004
Refactoring is the process of "improving the design of existing code." Learn how to become a faster and more productive refactorer with Castalia.
This is the fourth...
May 19, 2004
A little tip on using COM with Windows Services.
Today I tried accessing an XML document from a Windows service. When I prototyped my classes using a Windows forms app everything...
May 13, 2004
Learn about the various error finding habits of Delphi developers and how you can overcome bad habits to find errors faster and more efficiently
(Originally published at delphi-expert.com...
May 13, 2004
This article discusses observations on how the most effective developers are able to cut the amount of typing they do nearly in half and gives recommendations on how you can experience...
May 13, 2004
This article teaches techniques developers can use to navigate code faster and comprehend it better.
(Originally published at delphi-expert.com on May 14, 2004)
This is the third...
May 13, 2004
Learn about exceptions and how to write better error handling code. Learn how Castalia can help us write more robust and fault tolerant code.
(Originally published at delphi-expert.com...
May 13, 2004
This article discusses proper usage of temporary variables, motivations for splitting improper variables, and how to use Castalia to automatically split them.
I would like to address...
May 13, 2004
This article discusses Delphi's try..finally construct, when to use, and how Castalia makes it easier to use.
(Originally published at delphi-expert.com on March 16, 2004)
In a...
May 11, 2004
How to use FindFirst and FindNext with recursion, for adding filenames and paths to a stringlist
How to create a list of the files in a folder and its subfolders
In the following...
May 3, 2004
An example of implementing the Actor/Role pattern in Bold.
Role based programming in Bold
Bold allows developers to develop OOP applications which persist to a database. This gives...
April 27, 2004
A small tip showing how to tell windows that your Edit control should only allow numeric entry.
If you need a Windows Edit control to only accept valid numbers, but don't want...
April 19, 2004
This article explains how to detect if a diskette is in the disk drive on NT based systems (w2k, XP)Windows has the habit of requesting the user to insert a floppy. Normally this...
March 16, 2004
Borland's SelectDirectory browser is quite ugly, here is how to invoke the Windows one instead.uses
ShlObj, ShellAPI;
......
function BrowseForFolder(handle : HWND;...
March 12, 2004
One of the solutions to spam is a -frequent updated- database with IP addresses that appear to misbehave. This database should, preferably, be random accessible at high speed....
February 26, 2004
A small example of making derived attributes which are persisted to the database.Persistent derived attributes in Bold
Bold's derived attributes are always evaluated in memory,...