Last reviewed: 12/2/2009
Article ID: H120905
HOW: Developing Delphi Prism .NET applications that manage lexicons
The information in this article applies to:
- LexiconKit 3
If you love the features of .NET class libraries and love Delphi, then Delphi Prism is for you.
In LexiconKit 3, new Delphi Prism .NET samples have been added to illustrate manage lexicons with Delphi Prism.
The Chant LexiconKit 3 Win32 Developer Edition includes v1.1, v2, and v3 compiled LexiconKit class libraries. The Chant LexiconKit 3 WinCE Developer Edition includes cf2 compiled LexiconKit class libraries.
Within a Delphi Prism project, add the Chant.LexiconKit class library to your project with the following steps:
- highlight the References folder;
- press the right mouse button and select the Add Reference menu item;
- browse to the applicable version of the component libraries Chant.LexiconKit.DLL and Chant.Shared.DLL found in C:\Program Files\Chant\LexiconKit 3\Win32 Developer\NETv1.1\bin, C:\Program Files\Chant\LexiconKit 3\Win32 Developer\NETv2\bin or C:\Program Files\Chant\LexiconKit 3\Win32 Developer\NETv3\bin; and
- click OK to add the reference to your project.
Add Chant.LexiconKit and Chant.Shared to the Uses statement in your application to reference the LexiconKit classes and members within your code.
You declare the NChantLM object as follows:
// Declare global type variable for your class object as part of your Form or Window declaration NChantLM1: NChantLM; // Declare public procedure for your event handler public method NChantLM1_HasEvent(sender: System.Object; e: HasEventArgs);
You instantiate your class objects and add and event handers for the objects as follows:
// In your Form or Window constructor, instantiate your class object NChantLM1 := new NChantLM(self); // Add reference to your event handler NChantLM1.HasEvent += new NChantLM.HasEventHandler(NChantLM1_HasEvent);
Delphi Prism sample projects are installed at [My] Documents\Chant LexiconKit 3\NETv2\VS2008\Delphi and [My] Documents\Chant LexiconKit 3\NETv3\VS2008\Delphi.