You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(25) |
Oct
(10) |
Nov
(19) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(206) |
Mar
(43) |
Apr
(25) |
May
(20) |
Jun
(69) |
Jul
(121) |
Aug
(95) |
Sep
(122) |
Oct
(213) |
Nov
(46) |
Dec
(39) |
2006 |
Jan
(28) |
Feb
(57) |
Mar
(21) |
Apr
(7) |
May
(11) |
Jun
(2) |
Jul
(8) |
Aug
(13) |
Sep
(2) |
Oct
(2) |
Nov
(20) |
Dec
(16) |
2007 |
Jan
(9) |
Feb
(15) |
Mar
|
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(9) |
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(8) |
Apr
(1) |
May
|
Jun
|
Jul
(11) |
Aug
(57) |
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(7) |
2010 |
Jan
(11) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(27) |
Oct
(3) |
Nov
(7) |
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(10) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(4) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Carlo B. <car...@us...> - 2005-10-29 11:10:20
|
Update of /cvsroot/instantobjects/Source/Brokers/XML/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25102/Source/Brokers/XML/D7 Modified Files: DclIOXML.dpk IOXML.dpk Log Message: changes to XML packages to remove unrequired dbrlt package. Index: DclIOXML.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/DclIOXML.dpk,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DclIOXML.dpk 3 Sep 2005 08:03:12 -0000 1.5 --- DclIOXML.dpk 29 Oct 2005 11:10:08 -0000 1.6 *************** *** 33,37 **** vcl, rtl, - dbrtl, IOXML, vclx; --- 33,36 ---- Index: IOXML.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/IOXML.dpk,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IOXML.dpk 20 Oct 2005 08:04:00 -0000 1.6 --- IOXML.dpk 29 Oct 2005 11:10:08 -0000 1.7 *************** *** 32,38 **** vcl, rtl, ! dbrtl, ! IOCore, ! vclx; contains --- 32,37 ---- vcl, rtl, ! vclx, ! IOCore; contains |
From: Carlo B. <car...@us...> - 2005-10-29 11:10:20
|
Update of /cvsroot/instantobjects/Source/Brokers/XML/D6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25102/Source/Brokers/XML/D6 Modified Files: DclIOXML.dpk IOXML.dpk Log Message: changes to XML packages to remove unrequired dbrlt package. Index: DclIOXML.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D6/DclIOXML.dpk,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DclIOXML.dpk 3 Sep 2005 08:03:12 -0000 1.4 --- DclIOXML.dpk 29 Oct 2005 11:10:07 -0000 1.5 *************** *** 33,37 **** vcl, rtl, - dbrtl, IOXML, vclx; --- 33,36 ---- Index: IOXML.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D6/IOXML.dpk,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IOXML.dpk 20 Oct 2005 08:04:00 -0000 1.5 --- IOXML.dpk 29 Oct 2005 11:10:07 -0000 1.6 *************** *** 32,38 **** vcl, rtl, ! dbrtl, ! IOCore, ! vclx; contains --- 32,37 ---- vcl, rtl, ! vclx, ! IOCore; contains |
From: Carlo B. <car...@us...> - 2005-10-29 11:08:29
|
Update of /cvsroot/instantobjects/Source/Brokers/DBX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24675/Source/Brokers/DBX Modified Files: InstantDBXConnectionDefEdit.pas Log Message: Changes for D2006 compatibility Index: InstantDBXConnectionDefEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/InstantDBXConnectionDefEdit.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InstantDBXConnectionDefEdit.pas 29 Jul 2004 20:43:13 -0000 1.2 --- InstantDBXConnectionDefEdit.pas 29 Oct 2005 11:08:21 -0000 1.3 *************** *** 238,245 **** procedure TInstantDBXConnectionDefEditForm.UpdateParams; begin Connection.ConnectionName := ConnectionName; Connection.LoadParamsFromIniFile; ! ParamsEditor.Lines := Connection.Params; end; --- 238,249 ---- procedure TInstantDBXConnectionDefEditForm.UpdateParams; + var + i: integer; begin Connection.ConnectionName := ConnectionName; Connection.LoadParamsFromIniFile; ! ParamsEditor.Lines.Clear; ! for i := 0 to Connection.Params.Count -1 do ! ParamsEditor.Lines.add (Connection.Params[i]); end; |
From: Carlo B. <car...@us...> - 2005-10-29 11:03:22
|
Update of /cvsroot/instantobjects/Source/Install/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23193/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Install/D2006 added to the repository |
From: Carlo B. <car...@us...> - 2005-10-29 11:02:52
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23130/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Brokers/UIB/D2006 added to the repository |
From: Carlo B. <car...@us...> - 2005-10-29 11:02:44
|
Update of /cvsroot/instantobjects/Source/Brokers/NexusDb/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23071/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Brokers/NexusDb/D2006 added to the repository |
From: Carlo B. <car...@us...> - 2005-10-29 11:02:29
|
Update of /cvsroot/instantobjects/Source/Brokers/IBX/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22948/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Brokers/IBX/D2006 added to the repository |
From: Carlo B. <car...@us...> - 2005-10-29 11:02:14
|
Update of /cvsroot/instantobjects/Source/Brokers/DBX/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22780/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Brokers/DBX/D2006 added to the repository |
From: Carlo B. <car...@us...> - 2005-10-29 11:01:51
|
Update of /cvsroot/instantobjects/Source/Brokers/BDE/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22663/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Brokers/BDE/D2006 added to the repository |
From: Carlo B. <car...@us...> - 2005-10-29 11:01:45
|
Update of /cvsroot/instantobjects/Source/Brokers/ADO/D2006 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22510/D2006 Log Message: Directory /cvsroot/instantobjects/Source/Brokers/ADO/D2006 added to the repository |
From: Steven M. <sr...@us...> - 2005-10-28 13:02:14
|
Update of /cvsroot/instantobjects/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3884 Modified Files: IOHelp.cnt IOHelp.rtf IOHelp.hlp IOHelp.hsc Log Message: Review of Help files. Index: IOHelp.rtf =================================================================== RCS file: /cvsroot/instantobjects/Help/IOHelp.rtf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOHelp.rtf 28 Oct 2005 05:07:51 -0000 1.1 --- IOHelp.rtf 28 Oct 2005 13:01:53 -0000 1.2 *************** *** 13,20 **** \red0\green0\blue255; } - \par \pard\plain\f0 - - {\page} - {\pard\plain\f0\fs20 {\up #}{\footnote {\up #} ID_0} --- 13,16 ---- *************** *** 24,30 **** \par \pard\b0\fs18 Welcome to InstantObjects, the integrated framework for developing object-oriented business solutions in Delphi. \par ! \par InstantObjects is a RAD technology that enables creation of applications based on persistent business objects. It simplifies the process of realizing ideas into products; shortens time-to-marked, and helps keeping business focus. \par ! \par Even though it is still a bolted on technology, InstantObjects integrates with the Delphi IDE and Object Pascal in a simple, flexible and intuitive manner. There are no sophisticated environments that have to be comprehended before application development can begin. \par \par \cf2\{bmc instantobjects_logo.gif\}\cf1 --- 20,26 ---- \par \pard\b0\fs18 Welcome to InstantObjects, the integrated framework for developing object-oriented business solutions in Delphi. \par ! \par InstantObjects is a RAD technology that enables creation of applications based on persistent business objects. It simplifies the process of realizing ideas into products; shortens time-to-marke\lang1033\f0 t\lang1040\f0 , and helps keep business focus. \par ! \par Even though it is still a bolted\lang1033\f0 -\lang1040\f0 on technology, InstantObjects integrates with the Delphi IDE and Object Pascal in a simple, flexible and intuitive manner. There are no sophisticated environments that have to be comprehended before application development can begin. \par \par \cf2\{bmc instantobjects_logo.gif\}\cf1 *************** *** 40,45 **** \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 Using InstantObjects \cf1\b0\fs16 \par \pard\keepn\sb25\sa25\cf3\strike Group Topics\cf2\strike0{\v 327SA.Y>nav}\cf1 ! \par \pard\fs18 This user guide contains \f0 pratical\f0 guidelines for building InstantObjects-based applications. The intention is to give an overview o\f0 f\f0 the classes, components and tools that make up the InstantObjects framework. Although the guide is very detailed, it has not been the intention to cover all aspects of the framework. If more information is needed, we refer to the Symbol Reference. ! \par The guide is divided into three parts, which constitute almost any InstantObjects based development process. \par \par \pard\plain\f0 --- 36,41 ---- \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 Using InstantObjects \cf1\b0\fs16 \par \pard\keepn\sb25\sa25\cf3\strike Group Topics\cf2\strike0{\v 327SA.Y>nav}\cf1 ! \par \pard\fs18 This user guide contains \f0 practical\f0 guidelines for building InstantObjects\lang1033\f0 \lang1040\f0 based applications. The intention is to give an overview o\f0 f\f0 the classes, components and tools that make up the InstantObjects framework. Although the guide is very detailed, it has not been the intention to cover all aspects of the framework. If more information is needed, \lang1033\f0 please\lang1040\f0 refer to the Symbol Reference. ! \par The guide is divided into \lang1033\f0 the \lang1040\f0 three parts \lang1033\f0 that\lang1040\f0 constitute almost any InstantObjects based development process. \par \par \pard\plain\f0 *************** *** 69,73 **** \viewkind4\uc1\pard\keepn\b\f0\fs24 Installing \f0 InstantObjects\cf1\b0\fs16 \par \pard\keepn\sb25\tx1435\strike Group Topics\strike0{\v 327SA.Y>nav}\tab\strike Using InstantObjects\strike0{\v 75DE_G6>main}\f0 \f0 ! \par \pard\f0\fs18 For installation information, please refer to the file Readme.txt provided with the InstantObjects archive, in the Docs folder. Installation consists mainly of compiling and installing the appropriate packages in the Delphi IDE. The Readme file helps you determining what packages you need and the correct installation order. \par \par \pard\plain\f0 --- 65,69 ---- \viewkind4\uc1\pard\keepn\b\f0\fs24 Installing \f0 InstantObjects\cf1\b0\fs16 \par \pard\keepn\sb25\tx1435\strike Group Topics\strike0{\v 327SA.Y>nav}\tab\strike Using InstantObjects\strike0{\v 75DE_G6>main}\f0 \f0 ! \par \pard\f0\fs18 For installation information, please refer to the file Readme.txt provided in the Docs folder of the InstantObjects archive. Installation consists mainly of compiling and installing the appropriate packages in the Delphi IDE. The Readme file helps in determining the packages you need and their correct installation order. \par \par \pard\plain\f0 *************** *** 84,88 **** \par \pard\sb25\sa25\cf2\b\fs18\{bm\f0 l\f0 Powered by InstantObjects 150x38.gif\} \par \cf1 ! \par \b0\f0 InstantObjects' source files are released under the Mozilla Public License Version 1.1. \f0 You may obtain a copy of the License at\f0 http://www.mozilla.org/MPL/MPL-1.1.html.\f0 \par \par \cf4\strike\f1\fs20 www.instantobjects.org\cf2\strike0{\v *! ExecFile("http://www.instantobjects.org")}\cf1\f0\fs18 --- 80,84 ---- \par \pard\sb25\sa25\cf2\b\fs18\{bm\f0 l\f0 Powered by InstantObjects 150x38.gif\} \par \cf1 ! \par \b0\f0 InstantObjects source files are released under the Mozilla Public License Version 1.1. \f0 You may obtain a copy of the License at\f0 http://www.mozilla.org/MPL/MPL-1.1.html.\f0 \par \par \cf4\strike\f1\fs20 www.instantobjects.org\cf2\strike0{\v *! ExecFile("http://www.instantobjects.org")}\cf1\f0\fs18 *************** *** 100,104 **** \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 Creating the Business Model\cf1\b0\fs16 \par \pard\keepn\sb25\tx1435\strike Group Topics\strike0{\v 327SA3Q>nav}\tab\strike Using InstantObjects\strike0{\v 75DE_G6>main}\cf0\b\fs24 \cf1\b0\fs16 ! \par \pard\sb25\sa25\tx1435\fs18 Object Oriented applications are based on models. This section covers the initial steps in the creation of an InstantObjects based application, which is the definition of the business model. The InstantObjects Model Explorer is the central tool in this process. \par \par \pard\plain\f0 --- 96,100 ---- \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 Creating the Business Model\cf1\b0\fs16 \par \pard\keepn\sb25\tx1435\strike Group Topics\strike0{\v 327SA3Q>nav}\tab\strike Using InstantObjects\strike0{\v 75DE_G6>main}\cf0\b\fs24 \cf1\b0\fs16 ! \par \pard\sb25\sa25\tx1435\fs18 Object Oriented applications are based on models. This section covers the definition of the business model, which is \lang1033\f0 \lang1040\f0 the initial step in the creation of an InstantObjects based application. The InstantObjects Model Explorer is the central tool in this process. \par \par \pard\plain\f0 *************** *** 130,134 **** \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 The Model Explorer \cf1\b0\fs16 \par \strike Creating the Business Model\strike0{\v 327SA3P>main} ! \par \pard\sb25\sa25\fs18 The first step in building an application with InstantObjects is to define the classes and relations that make up the business model. The business model is created in the Model Explorer, which can be opened via the View-menu in the Delphi IDE. \par \cf0\b\f2\fs22 The Model Explorer with \f2 "\f2 Inheritance\f2 "\f2 view of classes\cf2\b0\f0\fs18 \par \{bmc ModelExplorerInheritance.gif\}\cf1 --- 126,130 ---- \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 The Model Explorer \cf1\b0\fs16 \par \strike Creating the Business Model\strike0{\v 327SA3P>main} ! \par \pard\sb25\sa25\fs18 The first step in building an application with InstantObjects is to define the classes and relations that make up the business model. The business model is created in the Model Explorer, which can be opened via the View\lang1033\f0 \lang1040\f0 menu in the Delphi IDE. \par \cf0\b\f2\fs22 The Model Explorer with \f2 "\f2 Inheritance\f2 "\f2 view of classes\cf2\b0\f0\fs18 \par \{bmc ModelExplorerInheritance.gif\}\cf1 *************** *** 157,163 **** \par On the first page of the Class Editor you can edit the general properties of the class. This is where you specify the name and base class, the model unit to hold the class and the persistence status of the class. \par The default base class of any business class is \strike TInstantObject\strike0{\v ID_170>main}, the class from which persistence capabilities are inherited. When classes are present in your model, you can choose any of these as the immediate base class instead. The unit in which the new class shall be placed can be selected from the list of available model units. ! \par The class can be defined as either persistent or embedded. Instances of persistent classes can be stored in and retrieved from the database. Instances of embedded classes can exist in the database only as part of another embedded or persistent object. If you want instances of a class to be retrievable or available by query, define the class persistent. ! \par \f0 Persistent classes are also required if you use the external storage option for collection attributes. A class used only for objects that are part of other objects should be defined as embedded if those objects use embedded (or classic) storage, and stored (persistent) if those objects use external storage.\f0 ! \par For persistent classes, a storage name can be specified. The storage name defines the table in which attributes of instances of the class are stored. By default, the storage name equals the class name without the preceding T. Change the storage name if you want the attributes stored in another table. \par \par \pard\plain\f0 --- 153,159 ---- \par On the first page of the Class Editor you can edit the general properties of the class. This is where you specify the name and base class, the model unit to hold the class and the persistence status of the class. \par The default base class of any business class is \strike TInstantObject\strike0{\v ID_170>main}, the class from which persistence capabilities are inherited. When classes are present in your model, you can choose any of these as the immediate base class instead. The unit in which the new class shall be placed can be selected from the list of available model units. ! \par The class can be defined as either persistent or embedded. Instances of persistent classes can be stored in and retrieved from the database. Instances of embedded classes can exist in the database only as part of another embedded or persistent object. If you want instances of a class to be retrievable or available by query, define the class\lang1033\f0 as\lang1040\f0 persistent. ! \par \f0 Persistent classes are also required if you use the external storage option for collection attributes. A class used only for objects that are part of other objects should be defined as embedded if the owning objects use embedded (or classic) storage for the attribute. If, however, the owning objects use external storage for the attribute, define the owned class with persistent storage.\f0 ! \par For persistent classes, a storage name can be specified. The storage name defines the table in which attributes of instances of the class are stored. By default, the storage name equals the class name without the preceding \lang1033\f0 '\lang1040\f0 T\lang1033\f0 '\lang1040\f0 . Change the storage name if you want the attributes stored \lang1033\f0 using\lang1040\f0 another table\lang1033\f0 name\lang1040\f0 . \par \par \pard\plain\f0 *************** *** 179,183 **** \par \cf2\{bmc AttributeEditorDefinition.gif\}\cf1 \par The name of the attribute can be any valid Object Pascal identifier. The storage name specifies the storage table column in which attribute values are stored. By default, the storage name is the same as the attribute name. ! \par The type of the attribute can be selected from the list of all the types supported by InstantObjects. Some of the available types are known as simple types, others are known as relational types. The simple types generally have an Object Pascal equivalent simple type. The relational types are used to define relations from instances of the class to other objects. The relational types are; Reference, Part, References and Parts. \par \par \b Reference\b0 --- 175,179 ---- \par \cf2\{bmc AttributeEditorDefinition.gif\}\cf1 \par The name of the attribute can be any valid Object Pascal identifier. The storage name specifies the storage table column in which attribute values are stored. By default, the storage name is the same as the attribute name. ! \par The type of the attribute can be selected from the list of all the types supported by InstantObjects. Some of the available types are known as simple types, others are known as relational types. The simple types generally have an Object Pascal equivalent simple type. The relational types are used to define relations from instances of the class to other objects. The relational types are\lang1033\f0 :\lang1040\f0 Reference, Part, References and Parts. \par \par \b Reference\b0 *************** *** 196,207 **** \par \b0\f0 Parts is the one-to-many counterpart of the equivalent one-to-one relation type, Part. A Parts relation can refer to any number of objects that are all considered to be part of the referring object. \par See \strike TInstantParts\strike0{\v ID_176>main} for more information. ! \par Parts and References are known as container attributes. When defining an attribute of one of these types, a corresponding array property and optional methods to access the container attribute is added to the class. For any of the relational types, the class of the related object(s) must be specified as the Object Class of the attribute. \par ! \par \f0 For \i "External Storage support"\i0 of Part, Parts and References attribute, refer to \cf3\strike External Storage of attributes\cf2\strike0{\v Scribble100}\cf1 . \par \f0 \par \cf0\ul\b\f2\fs20 Attribute Visibility and Accessibility\b0 \par \cf1\ulnone\f0\fs18 On the next page of the Attribute Editor you specify how the attribute can be accessed. \par \cf2\{bmc AttributeEditorAccess.gif\}\cf1 ! \par For every attribute a corresponding property is added to the class by which the value of the attribute can be accessed. The visibility scope of this property can be set on this page. For container attributes, methods to manipulate the content of the attribute can be selected here as well. Those methods will be created with the same visibility scope as the property. In addition to the array property created to access objects contained in container attributes, a count property reflecting the number of objects in the container will be added too. \par For some of the simple attribute types, settings regarding the presentation of the attribute can be specified on the last page of the Attribute Editor. An edit mask to be used when editing the value of the attribute can be specified in Mask. The characters that are accepted during input when editing the attribute value can be specified in Valid Characters. \par --- 192,203 ---- \par \b0\f0 Parts is the one-to-many counterpart of the equivalent one-to-one relation type, Part. A Parts relation can refer to any number of objects that are all considered to be part of the referring object. \par See \strike TInstantParts\strike0{\v ID_176>main} for more information. ! \par Parts and References are known as container attributes. When defining an attribute of one of these types, a corresponding array property and optional methods to access the container attribute \lang1033\f0 are\lang1040\f0 added to the class. For any of the relational types, the class of the related object(s) must be specified as the Object Class of the attribute. \par ! \par \f0 For \i "External Storage support"\i0 of the Part, Parts and References attribute, refer to \cf3\strike External Storage of Attributes\cf2\strike0{\v Scribble100}\cf1 . \par \f0 \par \cf0\ul\b\f2\fs20 Attribute Visibility and Accessibility\b0 \par \cf1\ulnone\f0\fs18 On the next page of the Attribute Editor you specify how the attribute can be accessed. \par \cf2\{bmc AttributeEditorAccess.gif\}\cf1 ! \par For every attribute a corresponding property is added to the class by which the value of the attribute can be accessed. The visibility scope of this property can be set on this page. For container attributes, methods to manipulate the content of the attribute can be selected here as well. Th\lang1033\f0 e selected\lang1040\f0 methods will be created with the same visibility scope as the property. In addition to the array property created to access objects contained in container attributes, a count property reflecting the number of objects in the container will\lang1033\f0 also\lang1040\f0 be added. \par For some of the simple attribute types, settings regarding the presentation of the attribute can be specified on the last page of the Attribute Editor. An edit mask to be used when editing the value of the attribute can be specified in Mask. The characters that are accepted during input when editing the attribute value can be specified in Valid Characters. \par *************** *** 212,220 **** {\pard\plain\f0\fs20 {\up #}{\footnote {\up #} Scribble100} ! {\up $}{\footnote {\up $} External Storage of attributes} {\up +}{\footnote {\up +} creatingbusinessmodel:000060} {\up K}{\footnote {\up K} External Storage of Attributes} } ! \viewkind4\uc1\pard\keepn\b\f0\fs24 External Storage of attributes\cf1\b0\f0\fs16 \par \pard\keepn\sb25\sa25\strike Creating the Business Model\strike0{\v 327SA3P>main} \f0\fs18 \par \pard\f0 Historically, IO stores part, parts and references attributes of a class as binary blob fields in the source table. This has caused a number of shortcomings and issues, namely: --- 208,216 ---- {\pard\plain\f0\fs20 {\up #}{\footnote {\up #} Scribble100} ! {\up $}{\footnote {\up $} External Storage of Attributes} {\up +}{\footnote {\up +} creatingbusinessmodel:000060} {\up K}{\footnote {\up K} External Storage of Attributes} } ! \viewkind4\uc1\pard\keepn\b\f0\fs24 External Storage of Attributes\cf1\b0\f0\fs16 \par \pard\keepn\sb25\sa25\strike Creating the Business Model\strike0{\v 327SA3P>main} \f0\fs18 \par \pard\f0 Historically, IO stores part, parts and references attributes of a class as binary blob fields in the source table. This has caused a number of shortcomings and issues, namely: *************** *** 225,230 **** \par \fs16 (*) note that to "corrupt" such a blob it suffices to delete a referenced object; the referencing objects can then no longer be loaded; if the referencing attribute is a "reference" attribute\f0 , then\f0 the fix is easy; if it's a "references" attribute it requires editing the binary blob. \par ! \par \fs18 The addition of the XML option for blobs somehow relieved item c), at the cost of bigger blobs \f0 which made for \f0 even poorer performance. ! \par External storage in IO means the ability to say that a particular part, parts or reference\f0 s\f0 attribute should be mapped outside of the source class' table, that is in an additional ad-hoc intermediate table. In the case of part attributes, the intermediate table is not even needed because the relationship among the owner and the part is 1:1. \par \par \ul\b How to use external storage --- 221,226 ---- \par \fs16 (*) note that to "corrupt" such a blob it suffices to delete a referenced object; the referencing objects can then no longer be loaded; if the referencing attribute is a "reference" attribute\f0 , then\f0 the fix is easy; if it's a "references" attribute it requires editing the binary blob. \par ! \par \fs18 The addition of the XML option for blobs some\lang1033\f0 what\lang1040\f0 relieved item c), at the cost of bigger blobs \f0 which made for \f0 even poorer performance. ! \par External storage in IO \lang1033\f0 enables\lang1040\f0 the ability to \lang1033\f0 specify that\lang1040\f0 a particular part, parts or reference\f0 s\f0 attribute should be mapped outside of the source class' table\lang1033\f0 ;\lang1040\f0 that is in an additional ad-hoc intermediate table. In the case of part attributes, the intermediate table is not needed because the relationship \lang1033\f0 between\lang1040\f0 the owner and the part is 1:1. \par \par \ul\b How to use external storage *************** *** 236,244 **** \par TestRef: Reference(TTest); \par TestRefs: References(TTest) external 'Test2_TestRefs'; \} ! \par \f0 The TestPart attribute is an external part attribute, which means that it leads to a mapping very similar to TestRef: instead of having a blob field called TestPart, the Test2 table has a couple TestPartId/TestPartClass, and the actual object is stored in its own Test table. \par \f0 You can opt for External storage in the Attribute Editor, by setting Storage Kind to the value \i "External"\i0 .\f0 \par \cf2\{bmc AttributeEditorDefinitionExternal.gif\}\cf1 \par ! \par PLEASE NOTE that all classes involved in external storage must have the "stored" specification\f0 (in other words, they should be persistent classes)\f0 . "embedded" classes are only useful for "embedded" (the historical arrangement) part and parts attributes. \par \par The TestParts attribute leads to the creation of an intermediate table called Test2_TestParts which has relationships with both Test2 and Test: --- 232,240 ---- \par TestRef: Reference(TTest); \par TestRefs: References(TTest) external 'Test2_TestRefs'; \} ! \par \f0 The TestPart attribute is an external part attribute, which means that it leads to a mapping very similar to TestRef\lang1033\f0 .\lang1040\f0 \lang1033\f0 I\lang1040\f0 nstead of having a blob field called TestPart, the Test2 table has \lang1033\f0 two reference fields,\lang1040\f0 TestPartId\lang1033\f0 and \lang1040\f0 TestPartClass, and the actual object\lang1033\f0 attributes\lang1040\f0 \lang1033\f0 are\lang1040\f0 stored\lang1033\f0 as a record\lang1040\f0 in its own Test table. \par \f0 You can opt for External storage in the Attribute Editor, by setting Storage Kind to the value \i "External"\i0 .\f0 \par \cf2\{bmc AttributeEditorDefinitionExternal.gif\}\cf1 \par ! \par PLEASE NOTE that all classes involved in external storage must have the "stored" specification\f0 (in other words, they must be persistent classes)\f0 . "embedded" classes \lang1033\f0 may only be used \lang1040\f0 for "embedded" (the historical arrangement) part and parts attributes. \par \par The TestParts attribute leads to the creation of an intermediate table called Test2_TestParts which has relationships with both Test2 and Test: *************** *** 246,252 **** \par This intermediate table has fields to hold information about the relationships and the sequence of elements in the source class' collection attribute. \par ! \par The mapping of the TestRefs attribute is very similar; the only difference is that the parts attribute's target object is deleted when the source object is deleted; this of course does not happen with references attributes. \par ! \par At design time, you can select the "external" specification in the Attribute Editor. The "Storage Kind" combo-box allows to choose between Embedded (the classic model) and External (the new model). For Part attributes, that (in addition to defining the target class "stored" and not "embedded") is enough. For Parts and References you also need to type the External Storage Name, that is the name the intermediate table will have. Personally I use the "<source table name>_<attribute name>" convention, but everyone is of course free to choose a different naming scheme. \par \pard\cf0\f2\fs20 \par \pard\plain\f0 --- 242,248 ---- \par This intermediate table has fields to hold information about the relationships and the sequence of elements in the source class' collection attribute. \par ! \par The mapping of the TestRefs attribute is very similar\lang1033\f0 .\lang1040\f0 \lang1033\f0 T\lang1040\f0 he only difference is that the parts attribute's \lang1033\f0 table record\lang1040\f0 is deleted when the source \lang1033\f0 table record\lang1040\f0 is deleted\lang1033\f0 .\lang1040\f0 \lang1033\f0 T\lang1040\f0 his of course does not happen with references attributes. \par ! \par At design time, you can select the "external" specification in the Attribute Editor. The "Storage Kind" combo-box allows to choose between Embedded (the classic model) and External (the new model). For Part attributes that (in addition to defining the target class "stored" and not "embedded") is enough. For Parts and References you also need to type the External Storage Name, that is the name the intermediate table will have. \lang1033\f0 One naming \lang1040\f0 convention\lang1033\f0 , suggested as the default, is to \lang1040\f0 use "<source table name>_<attribute name>", but\lang1033\f0 ,\lang1040\f0 of course\lang1033\f0 , any other suitable\lang1040\f0 naming scheme\lang1033\f0 may be used\lang1040\f0 . \par \pard\cf0\f2\fs20 \par \pard\plain\f0 *************** *** 275,307 **** \viewkind4\uc1\pard\keepn\b\f2\fs26 Example 1\b0\fs20 \par \cf1\strike\f0\fs16 Adding Business Rules\strike0\f0{\v 327SA3V>main} \cf0\f2\fs20 ! \par \pard\f2 Normalmente i controlli sui campi vengono fatti negli eventi OnValidate e OnChange. Fortunatamente con InstantObjects non bisogna pi\'f9 utilizzare questo sistema ma si utilizza normalmente il Setter dell'attributo di un oggetto: \par ! \par \f1 procedure TAddress.SetPostalCode(const Value: string); ! \par begin ! \par //OnValidate ! \par if (Length(Value) <> 6) and (Value <> '') then ! \par raise Exception.Create('Postal Code must be filled with 6 chars'); ! \par ! \par _PostalCode.Value := Value; <-- codice scritto automaticamente da InstantObjects ! \par ! \par //OnChange ! \par if (Value <> '') and (City = '') then \par GetDefaultCityByPostalCode(Value); ! \par end; \par \f2 ! \par \f2 Quando invece occorre fare controlli "incrociati" su pi\'f9 attributi \'e8 consigliabile utilizzare il metodo BeforeStore (Look at \cf3\strike Example 2\cf2\strike0{\v Scribble130}\cf0 ) \par ! \par N.B. attenzione al codice che si scrive dentro il Setter di un attributo: esso non viene invocato solo in fase di modifica, ma ogni volta che un Exposer aggiorna l'oggetto corrente. \par - \par Ad esempio se si vuole svuotare la data pi\'f9 alta di un range di due date quando l'utente modifica la prima si potrebbe scrivere: - \par \f1 procedure TShipment.SetMinShipDate(const Value: TDateTime); - \par begin - \par _MinShipDate.Value := Value; <-- codice scritto automaticamente da InstantObjects - \par - \par if (Value = 0) then - \par MaxShipDate := 0; - \par end; - \par \f2 Ma la \f1 MaxShipDate verr\'e0 azzerata anche se l'utente non "modifica" SetMinShipDate, quando l'oggetto viene caricato da un Exposer con LoadFields. L'errore \'e8 concettuale: la logica di business si deve preoccupare solo della correttezza dei dati, quindi in questo caso si dovrebbe solo controllare che la MinShipDate non deve superare la MaxShipDate e questo controllo andrebbe fatto in BeforeStore. - \par Se si vuole ottenere l'effetto desiderato occorre agire a livello di "interfaccia utente" e quindi a livello di evento OnChange del field sull'Exposer che mostra gli attributi di un oggetto.\f2 \par \pard\plain\f2 --- 271,302 ---- \viewkind4\uc1\pard\keepn\b\f2\fs26 Example 1\b0\fs20 \par \cf1\strike\f0\fs16 Adding Business Rules\strike0\f0{\v 327SA3V>main} \cf0\f2\fs20 ! \par \pard\f2 In InstantObjects you usually apply single-attribute business rules in the attribute's property setter method: \par ! \par \b\f1 procedure\b0 TAddress.SetPostalCode(\b const \b0 Value: \b string\b0 ); ! \par \b begin\b0 ! \par \i // Validation: raise exceptions to prevent value assignment. ! \par \i0 \b if \b0 (Length(Value) <> 6) \b and \b0 (Value <> '') \b then\b0 ! \par \b raise \b0 Exception.Create(\i 'Postal Code must be filled with 6 chars'\i0 ); ! \par \i // Assignment: this code will usually be written by InstantObjects automatically. ! \par \i0 _PostalCode.Value := Value; ! \par \i // Post-assignment: do things as a consequence of an attribute's value change ! \par // (see also the virtual method AttributeChanged). ! \par \i0 \b if \b0 (Value <> '') \b and \b0 (City = '') \b then\b0 \par GetDefaultCityByPostalCode(Value); ! \par \b end\b0 ; \par \f2 ! \par \f2 If you need to apply business rules that involve more than one attribute, instead, you often use the BeforeStore virtual method(see \cf3\strike Example 2\cf2\strike0{\v Scribble130}\cf0 ). \par ! \par When you code side effects, be aware that the property setters might be called more often than expected, for example when reading an object from an XML file or when you use the data-aware presentation layer. Here is an example: ! \par ! \par \b\f1 procedure \b0 TShipment.SetMinShipDate(\b const \b0 Value: TDateTime); ! \par \b begin\b0 ! \par \i // Assignment: this code will usually be written by InstantObjects automatically. ! \par \i0 _MinShipDate.Value := Value; ! \par MaxShipDate := 0; ! \par \b end\b0 ; ! \par \f2 ! \par The intent of this code is to reset MaxShipDate whenever MinShipDate changes, so that a user, in a hypothetical data-entry scenario, will have to re-enter a value for MaxShipDate. But things might not work always as expected. For example, SetMinShipDate might be called after SetMaxShipDate when streaming in an object from a XML file. The lesson here is: use the property setters and the BeforeStore method only to appy real business rules (like "MaxShipDate must be equal to or greater than MinShipDate"), and code data-entry rules (like "whenever a value for MinShipDate is entered, MaxShipDate should be reset") at the data-entry level (that is, not in the model classes). \par \par \pard\plain\f2 *************** *** 315,335 **** \viewkind4\uc1\pard\keepn\b\f2\fs26 Example 2\b0\fs20 \par \cf1\strike\f0\fs16 Adding Business Rules\strike0\f0{\v 327SA3V>main} ! \par \pard\cf0\f2\fs20 Per controllare i dati prima di memorizzare l'oggetto si utilizza di solito il metodo BeforeStore. Questo metodo di norma contiene i controlli che vengono scritti nell'evento BeforePost in una applicazione basata sui dataset. \par ! \par \f1 procedure TCountry.BeforeStore; ! \par begin ! \par if Id = '' then ! \par raise Exception.Create('Country ID missing'); ! \par inherited; ! \par end; \par \f2 ! \par \f2 Per inizializzare i dati di un oggetto si utilizza di solito il metodo AfterCreate: ! \par \f1 procedure TContact.AfterCreate; ! \par begin ! \par inherited; \par Id := InstantGenerateId; ! \par _Category.ReferenceObject(TCategory, 'CAT000'); ! \par end; ! \par \f2 Da notare che AfterCreate non viene chiamato quando un oggetto viene letto (Retrieve) dallo storage: in quel caso viene invocato il metodo AfterRetrieve. \par \f2 \par \pard\plain\f0 --- 310,337 ---- \viewkind4\uc1\pard\keepn\b\f2\fs26 Example 2\b0\fs20 \par \cf1\strike\f0\fs16 Adding Business Rules\strike0\f0{\v 327SA3V>main} ! \par \pard\cf0\f2\fs20 Business rules that involve more than one attribute are usually applied in BeforeStore, which gets called whenever the Store method is called to write an object (back) to the storage. Example: \par ! \par \b\f1 procedure \b0 TShipment.BeforeStore; ! \par \b begin\b0 ! \par \b if \b0 MinShipDate > MaxShipDate \b then\b0 ! \par \b raise \b0 Exception.Create(\i 'Date range error'\i0 ); ! \par \b inherited\b0 ; ! \par \b end\b0 ; \par \f2 ! \par \f2 You initialize an object by overriding Initialize (if you need to apply initialization code both when a new object is created and when it is retrieved from the storage), or AfterCreate (if you need to apply initialization code for newly created objects only). There is also an AfterRetrieve method that you can override to apply initialization code only when an existing object is read from the storage and materialized in memory. Here is an example of AfterCreate: ! \par \f2 ! \par \b\f1 procedure \b0 TContact.AfterCreate; ! \par \b var ! \par \b0 vCategory: TCategory; ! \par \b begin\b0 ! \par \b inherited\b0 ; \par Id := InstantGenerateId; ! \par vCategory := TCategory.Retrieve(\i 'CAT000'\i0 ); ! \par \b try\b0 ! \par Category := vCategory; ! \par \b finally\b0 ! \par vCategory.Free; ! \par \b end\b0 ; ! \par \b end\b0 ; \par \f2 \par \pard\plain\f0 *************** *** 345,364 **** \viewkind4\uc1\pard\keepn\cf1\lang1040\b\f0\fs24 Building/Evolving the Business Model \b0\fs16 \par \strike Creating the Business Model\strike0{\v 327SA3P>main} ! \par \pard\sb25\sa25\fs18 The final step in the modeling phase is to make the model physical in terms of storage for the objects. The required tables and indices have to be created from the business model. InstantObjects allows you to use various types of databases as storage for your persistent objects\f0 , using different brokers.\f0 \par The Connection Manager, which is available on the toolbar of the Model Explorer, helps you \f0 define, \f0 create \f0 and evolve \f0 your database. ! \par \cf2\f0\{bmc ConnectionManager.gif\}\cf1\ul\b \par Defining a Broker/Connection\ulnone\b0\f0 ! \par The first step in preparing the database is to \f0 define\f0 a connect\f0 or\f0 \f0 using a specific broker to estabilish a connection \f0 to the database.\f0 ! \par Select New in the context menu and the preferred Broker. A specific ConnectionDef Editor appears.\f0 \par \cf2\{bmc ConnectionDefEditor.gif\}\cf1 ! \par \f0 Define the connection properties and store the connection definition.\f0 ! \par \par \ul\b\f0 Building a Model into a database\ulnone\b0\f0 ! \par \f0 Select the Broker/Connection do you want to use to Build your database and press "Build" button. A "Database Builder" window appears. You can show the building steps a run the building process. \b Be careful: all data will be lost!\b0 ! \par \cf2\{bml DatabaseBuilder.gif\}\cf1 ! \par ! \par \ul\b Evolve a Model into an existing database\ulnone\b0\f0 ! \par \f0 Select the Broker/Connection do you want to use to Build your database and press "Evolve" button. A "Database Evolver" window similar to the "Database Builder" windows appears. You can show the evolving steps needed to upgrade the database structure. Run the evolve process. ! \par \b All data is preserved into database. \par \par \b0\f0 --- 347,368 ---- \viewkind4\uc1\pard\keepn\cf1\lang1040\b\f0\fs24 Building/Evolving the Business Model \b0\fs16 \par \strike Creating the Business Model\strike0{\v 327SA3P>main} ! \par \pard\sb25\sa25\fs18 The final step in the modeling phase is to make the model physical in terms of storage for the objects. The required tables and indices have to be created from the business model. InstantObjects allows you to use various types of databases as storage for your persistent objects\lang1033\f0 by\lang1040 using different brokers. ! \par \f0 \par The Connection Manager, which is available on the toolbar of the Model Explorer, helps you \f0 define, \f0 create \f0 and evolve \f0 your database. ! \par \cf2\f0\{bmc ConnectionManager.gif\} ! \par \cf1\ul\b \par Defining a Broker/Connection\ulnone\b0\f0 ! \par The first step in preparing the database is to \f0 define\f0 a connect\f0 or\f0 \f0 using a specific broker to establish a connection \f0 to the database.\f0 ! \par Click the right mouse button over the \f0 Connection Manager\lang1033\f0 dialog and s\lang1040 elect New in the pop-up context menu. Choose the preferred Broker and its ConnectionDef Editor appears.\f0 \par \cf2\{bmc ConnectionDefEditor.gif\}\cf1 ! \par \f0 Define the connection properties and store the connection definition. ! \par \f0 \par \ul\b\f0 Building a Model into a database\ulnone\b0\f0 ! \par \f0 Select the Broker/Connection you want to use to Build your database and press the "Build" button. A "Database Builder" window appears. You can see the building steps and run the building process. \b Be careful: all current data will be lost during the build!\b0 ! \par \cf2\{bml DatabaseBuilder.gif\} ! \par \cf1 ! \par \ul\b Evolving an existing database\ulnone\b0\f0 ! \par \f0 If you build the database, put some data in it and later change the model, you need to "evolve" the database. Unlike the Build procedure, which will destroy and recreate all database tables, the Evolution process will try to save the data. The effectiveness of the Evolution procedure depends on the features of the particular kind of database you are using. For example, if your SQL database server allows you to alter the size of a column with a SQL/DDL statement, then InstantObjects will attempt to do it, otherwise it won't. There are plans to improve the evolution process so that it overcomes the limitations of the database. In our example, IO's database evolver could add a new temporary column, copy the old data into it, then drop the old column, recreate it and pump the data back, finally dropping the temporary column. ! \par To evolve an existing database, select the Broker/Connection you want to use and press the "Evolve" button. A "Database Evolver" window similar to the "Database Builder" window will appear. In the list you can see the evolution steps needed to upgrade the database structure. You may selectively disable some of them (useful in special cases) and apply them to the database. \b In this case no data is lost. \par \par \b0\f0 *************** *** 420,426 **** \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 The Connector \cf1\b0\fs16 \par \strike Creating the User Interface\strike0{\v 75DE_G4>main} ! \par \pard\sb25\sa25\f0\fs18 Qui andrebbe spiegato un po' meglio il ruolo di un broker. A quanto pare la versione 1.0 non aveva il TInstantBroker\f0 ! \par ! \par In order for your application to use the database as object storage, you must use a connector component. The connector acts as a gateway between your application and the database, managing all the objects that are stored to and retrieved from the database. A connector component for each type of data access layer that is supported by InstantObjects is available on the component palette. A connector is attached to a database by assigning a connection component to its Connection property. Each connector component supports its own connection type: \par \par \pard\sb25\sa25\tx1980\tx4800\b Access type\tab Connector type\tab\f0 Type of \f0 Connection\b0 --- 424,428 ---- \viewkind4\uc1\pard\keepn\lang1040\b\f0\fs24 The Connector \cf1\b0\fs16 \par \strike Creating the User Interface\strike0{\v 75DE_G4>main} ! \par \pard\sb25\sa25\fs18 In order for your application to use the database \lang1033\f0 for\lang1040\f0 object storage, you must use a connector component. The connector acts as a gateway between your application and the database\f0 (by means of an internal component called the broker) and \f0 manag\lang1033\f0 es\lang1040\f0 all the objects that are stored to and retrieved from the database. A connector component for each type of data access layer that \lang1033\f0 has been installed from\lang1040\f0 InstantObjects is available on the component palette. A connector is attached to a database by assigning a connection component to its Connection \f0 (or equivalent) \f0 property. Each connector component supports its own connection type\f0 . For example:\f0 \par \par \pard\sb25\sa25\tx1980\tx4800\b Access type\tab Connector type\tab\f0 Type of \f0 Connection\b0 *************** *** 431,439 **** \par \f0 XML\tab\cf0\f0 TInstantX\f0 ML\f0 Connector\cf1\tab TXMLFilesAccessor \par \pard ! \par \f0 Sono disponibili altri brokers come NexusDB, UIB, ZeosDBO, ecc... per l'utilizzo di database e tecnologie di accesso ai dati alternativea quelle fornite con Delphi.\f0 ! \par ! \par Drop an appropriate connector component and a matching connection component on a form or a data module in your project. Configure the connection component to access the database and assign it to the Connection property of the connector component. The connector will use the connection to gain access to the database. By setting the IsDefault property to True, the connector will be used as the default connector in the application. \par ! \par \f0 E' anche possibile usare il TInstantConnectionManager invece che utilizzare direttamente un connector se si vuole mantenere una totale indipendenza dell'applicazione da una specifica tecnologia come mostrato nel Primer demo.\f0 \par \pard\plain\f0 --- 433,442 ---- \par \f0 XML\tab\cf0\f0 TInstantX\f0 ML\f0 Connector\cf1\tab TXMLFilesAccessor \par \pard ! \par \f0 InstantObjects supports a variety of databases and data-access technologies (for example NexusDB, ZeosDBO, Unified InterBase...) by means of packages called Brokers. You can build and install the broker(s) you need from the Brokers sub-folder of InstantObjects's Source folder. ! \par \f0 ! \par Drop an appropriate connector component and a matching connection component on a form or a data module in your project. Configure the connection component to access the database and assign it to the Connection \f0 (or equivalent) \f0 property of the connector component. The connector will use the connection to gain access to the database. By setting the IsDefault property to True, the connector will be used as the default connector in the application. \par ! \par \f0 You can also use a TInstantConnectionManager component that stores connection data in external files and can create connectors and connections automatically based on this data. This is particularly useful when you don't want to hardcode a particular broker or set of brokers into your program. See the Primer demo application for an example of this technique. ! \par \f0 \par \pard\plain\f0 *************** *** 450,457 **** \par \pard\sb25\sa25\strike\fs18 TInstantExposer\strike0{\v ID_416>main} is a dataset component that maps objects to the user interface of your application. \par Attributes defined in the business model are accessed through properties. Properties that are published can be accessed by data-aware controls via this component. In addition, the content of container attributes can be accessed too. The exposer component maps the published properties of objects to fields in a dataset. The objects being exposed are represented as rows in the dataset. ! \par To expose an object, it must be assigned to the Subject property of a \strike TInstantExposer\strike0{\v ID_416>main}. To expose multiple objects contained within another object, assign the main object to the Subject property and enter content mode by changing the Mode property from amObject to amContent. If the exposed class has no default container, specify the desired container in the property ContainerName. Specify the class of the exposed object(s) in the property ObjectClassName. ! \par By default, an exposer will make all simple properties of each exposed object as well as any related object available through fields in the dataset. Every field will have a fieldname matching the property it represents. For related objects, the fieldname will be the complete path to the property using regular dot notation. The property FieldOptions and the event OnIncludeField allow you to limit or extend the number fields to include. \par Container attributes of exposed objects are automatically recognized by the exposer and represented as nested datasets within the exposer. ! \par Exposers can be linked together in master/detail relations. To link one exposer to another, assign the master exposer to the DataSet property of a TDataSource and assign the TDataSource to the MasterSource property of the detail exposer. The Subject of the detail exposer will be set to the current object of the master exposer, whenever this changes. If you want the detail exposer to expose an object that is related to the current object of the master exposer instead, simply specify the desired property path in MasterProperty. \par \strike TInstantExposer\strike0{\v ID_416>main} is not limited to exposing \strike TInstantObject\strike0{\v ID_170>main} descendants. Any object with published propertied can be exposed. The content of standard VCL containers like TList, TObjectList and TCollection can be exposed in content mode. \par --- 453,460 ---- \par \pard\sb25\sa25\strike\fs18 TInstantExposer\strike0{\v ID_416>main} is a dataset component that maps objects to the user interface of your application. \par Attributes defined in the business model are accessed through properties. Properties that are published can be accessed by data-aware controls via this component. In addition, the content of container attributes can be accessed too. The exposer component maps the published properties of objects to fields in a dataset. The objects being exposed are represented as rows in the dataset. ! \par To expose an object, it must be assigned to the Subject property of a \strike TInstantExposer\strike0{\v ID_416>main}. To expose multiple objects contained within another object, assign the main object to the Subject property and enter content mode by changing the Mode property from amObject to amContent. If the exposed class has no default container, specify the desired container in the property ContainerName. Specify the class of the exposed\lang1033\f0 , contained\lang1040\f0 object(s) in the property ObjectClassName. ! \par By default, an exposer will make all simple properties of each exposed object as well as any related object available through fields in the dataset. Every field will have a \f0 F\f0 ield\f0 N\f0 ame matching the property it represents. For related objects, the fieldname will be the complete path to the property using regular dot notation. The property FieldOptions and the event OnIncludeField allow you to limit or extend the number fields to include. \par Container attributes of exposed objects are automatically recognized by the exposer and represented as nested datasets within the exposer. ! \par Exposers can be linked together in master/detail relation\f0 ships\f0 . To link one exposer to another, assign the master exposer to the DataSet property of a TDataSource and assign the TDataSource to the MasterSource property of the detail exposer. The Subject of the detail exposer will be set to the current object of the master exposer\lang1033\f0 and updated\lang1040\f0 whenever this changes. If you want the detail exposer to expose an object that is related to the current object of the master exposer instead, simply specify the desired property path in MasterProperty. \par \strike TInstantExposer\strike0{\v ID_416>main} is not limited to exposing \strike TInstantObject\strike0{\v ID_170>main} descendants. Any object with published propertied can be exposed. The content of standard VCL containers like TList, TObjectList and TCollection can be exposed in content mode. \par *************** *** 469,473 **** \par \strike Creating the User Interface\strike0{\v 75DE_G4>main} \par \pard\sb25\sa25\fs18 The \strike TInstantSelector\strike0{\v ID_417>main} component allows you to select objects from the database and optionally expose them in the user interface. ! \par To select objects from the database, a command must be specified with the Command property. The syntax of this command is somewhat similar to an SQL SELECT-statement, \f0 called IQL, \f0 but instead of tables and columns, you specify classes and attributes: \par \pard\keep\f3 \par SELECT [DISTINCT] *|<Attribute> --- 472,476 ---- \par \strike Creating the User Interface\strike0{\v 75DE_G4>main} \par \pard\sb25\sa25\fs18 The \strike TInstantSelector\strike0{\v ID_417>main} component allows you to select objects from the database and optionally expose them in the user interface. ! \par To select objects from the database, a command must be specified \lang1033\f0 in\lang1040\f0 the Command property. The syntax of this command\f0 (called an IQL command, from Instant Query Language) \f0 is somewhat similar to an SQL SELECT-statement\f0 , \f0 but instead of tables and columns, you specify classes and attributes: \par \pard\keep\f3 \par SELECT [DISTINCT] *|<Attribute> *************** *** 476,511 **** \par [ORDER BY <Attribute list>] \par \pard\sb25\sa25\f0 - \par \par The simplest command that can be specified looks like this: \par \pard\keep\f3 \par SELECT * FROM TContact \par \pard\sb25\sa25\f0 ! \par ! \par This command would select all concrete instances of the class TContact. To select instances of TContact and any descendant class, add the ANY keyword: \par \pard\keep\f3 \par SELECT * FROM ANY Tcontact \par \pard\sb25\sa25\f0 ! \par ! \par If you want to select objects that are related to instances of a class, specify the relation attribute instead of the star, like this: \par \pard\keep\f3 \par SELECT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 - \par \par If the same object is related to from several objects via the specified attribute and you do not want it to appear more than once in the result, use the DISTINCT keyword with the attribute: \par \pard\keep\f3 \par SELECT DISTINCT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 - \par \par To select from objects that meet a certain criteria, you must add a WHERE clause to the command. This clause must contain an expression that evaluates to True or False. The expression can use attributes, constants and functions in combination with the most common operators. The following example will select all customers with a negative balance. \par \pard\keep\f3 \par SELECT * FROM TCustomer WHERE Balance < 0 \par \pard\sb25\sa25\f0 - \par \par To order the selected objects by one or more attributes, specify the attributes with ORDER BY: \par \pard\keep\f3 \par SELECT * FROM TCustomer ORDER BY Balance, Name \par \pard\sb25\sa25\f0 - \par - \par For an in-depth explanation of the Command property, please consult the InstantObjects Reference Guide. \par When the selector is opened, it performs a query against the database. The resulting objects are available via the Objects property. The number of objects selected can be read via the property ObjectCount. \par If you want to expose the selected objects in the user interface, simply assign the selector to a TDataSource that is attached to data-aware controls. --- 479,506 ---- \par [ORDER BY <Attribute list>] \par \pard\sb25\sa25\f0 \par The simplest command that can be specified looks like this: \par \pard\keep\f3 \par SELECT * FROM TContact \par \pard\sb25\sa25\f0 ! \par This command select\f0 s\f0 all concrete instances of the class TContact. To select instances of TContact and any descendant class, add the ANY keyword: \par \pard\keep\f3 \par SELECT * FROM ANY Tcontact \par \pard\sb25\sa25\f0 ! \par If you want to select objects that are related to instances of a class, specify the relation attribute instead of the \f0 *\f0 , like this: \par \pard\keep\f3 \par SELECT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 \par If the same object is related to from several objects via the specified attribute and you do not want it to appear more than once in the result, use the DISTINCT keyword with the attribute: \par \pard\keep\f3 \par SELECT DISTINCT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 \par To select from objects that meet a certain criteria, you must add a WHERE clause to the command. This clause must contain an expression that evaluates to True or False. The expression can use attributes, constants and functions in combination with the most common operators. The following example will select all customers with a negative balance. \par \pard\keep\f3 \par SELECT * FROM TCustomer WHERE Balance < 0 \par \pard\sb25\sa25\f0 \par To order the selected objects by one or more attributes, specify the attributes with ORDER BY: \par \pard\keep\f3 \par SELECT * FROM TCustomer ORDER BY Balance, Name \par \pard\sb25\sa25\f0 \par When the selector is opened, it performs a query against the database. The resulting objects are available via the Objects property. The number of objects selected can be read via the property ObjectCount. \par If you want to expose the selected objects in the user interface, simply assign the selector to a TDataSource that is attached to data-aware controls. *************** *** 662,666 **** \par \pard\sb25\tx1435\strike Example 1\strike0{\v 327SA4Y>example}\tab\strike Programming with Persistent Objects\strike0{\v 327SA.T>main} \par \pard\sb25\sa25\tx1435\fs18 Persistent object relations defined by relational attributes in the business model can be accessed just as easy as any other attribute. Single object relations defined by Part and Reference attributes are accessed through the corresponding object property of the class. Multiple object references defined by Parts and References are accessed through the corresponding array property and the container methods defined for the attribute. ! \par The following code defines a class containing the various relation types. The procedure CreateSamplePerson creates a TPerson object with a sample name and address, associates it with a company and adds some phones and colleagues to it. The procedures ShowPhones and ShowColleagues shows a message with the caption of each of the corresponding objects associated with the person. The code assumes that a default connector has been created. \par \par \pard\plain\f0 --- 657,661 ---- \par \pard\sb25\tx1435\strike Example 1\strike0{\v 327SA4Y>example}\tab\strike Programming with Persistent Objects\strike0{\v 327SA.T>main} \par \pard\sb25\sa25\tx1435\fs18 Persistent object relations defined by relational attributes in the business model can be accessed just as easy as any other attribute. Single object relations defined by Part and Reference attributes are accessed through the corresponding object property of the class. Multiple object references defined by Parts and References are accessed through the corresponding array property and the container methods defined for the attribute. ! \par The following code defines a class containing the various relation types. The procedure CreateSamplePerson creates a TPerson object with a sample name and address, associates it with a company and adds some phones and colleagues to it. The procedures ShowPhones and ShowFriends shows a message with the caption of each of the corresponding objects associated with the person. The code assumes that a default connector has been created. \par \par \pard\plain\f0 *************** *** 797,808 **** {\pard\plain\f0\fs20 {\up #}{\footnote {\up #} Scribble300} ! {\up $}{\footnote {\up $} Using the InstantQuery} } ! \viewkind4\uc1\pard\keepn\cf1\b\f0\fs24 Using the InstantQuery\b0\fs16 \par \strike Example 1\strike0{\v Scribble310>example}\tab\strike Programming with Persistent Objects\strike0{\v 327SA.T>main}\cf2\cf1 ! \par \pard\cf0\fs18 TInstant\f0 Query\cf1\f0 \f0\'e8 una classe non disponibile sulla palette dei componenti di InstantObjects ma molto utile per la sua capacit\'e0 di estrarre una lista di oggetti dal database attraverso il linguaggio IQL, allo stesso modo di un \strike\f0 TInstantSelector\strike0{\v ID_417>main}\f0 . ! \par Il vantaggio sta nel fatto che gli oggetti non sono poi mappati sul buffer di un dataset ma sono disponibili in una lista della InstantQuery. E' quindi possibile utilizzarli per effettuare delle elaborazioni con prestazioni molto superiori all'utilizzo di un TInstantSelector. \par ! \par \f1 \par \pard\plain\f0 --- 792,802 ---- {\pard\plain\f0\fs20 {\up #}{\footnote {\up #} Scribble300} ! {\up $}{\footnote {\up $} Using an InstantQuery} } ! \viewkind4\uc1\pard\keepn\cf1\b\f0\fs24 Using an InstantQuery\b0\fs16 \par \strike Example 1\strike0{\v Scribble310>example}\tab\strike Programming with Persistent Objects\strike0{\v 327SA.T>main}\cf2\cf1 ! \par \pard\cf0\f0\fs18 TInstantQuery is not available in Delphi's Component or Tool Palette, but it is useful to fetch a list of objects from the storage through an IQL statement. TInstantQuery basically represents the core of \cf1 \strike\f0 TInstantSelector\strike0{\v ID_417>main}\f0 . \par ! \par TInstantQuery is an abstract class. What you actually use are concrete descendant classes, which you instantiate through the connector's CreateQuery method. The advantage in using a TInstantQuery descendant lies directly in the lower overhead, as there is no TDataSet buffer management involved. So, if you want to fetch objects and don't have a data-aware presentation layer, TInstantQuery is the preferred way to do it. \f1 \par \pard\plain\f0 *************** *** 815,839 **** \viewkind4\uc1\pard\keepn\b\f0\fs24 Example 1 \par \cf3\b0\strike\f0\fs16 Using the InstantQuery\cf2\strike0{\v Scribble300}\cf1\f0 ! \par \pard\f1\fs18 function CompanyOfCityCount(const CityId : string) : integer; ! \par var ! \par InstantQuery : TInstantQuery; ! \par begin ! \par //Create the InstantQuery \par InstantQuery := InstantDefaultConnector.CreateQuery; ! \par try ! \par //Assigning a IQL command ! \par InstantQuery.Command := 'SELECT * FROM ANY TCompany WHERE City = :City'; ! \par //If there are parameters into Command call FetchParams \par InstantQuery.FetchParams(InstantQuery.Command, InstantQuery.Params); ! \par //Setting param CityId ! \par InstantQuery.Params.ParamByName('City').AsString := CityId; \par InstantQuery.Open; \par Result := InstantQuery.ObjectCount; ! \par finally \par InstantQuery.Free; ! \par end; ! \par end; ! \par ! \par \par \cf0\f2\fs20 \par \pard\plain\f2 --- 809,829 ---- \viewkind4\uc1\pard\keepn\b\f0\fs24 Example 1 \par \cf3\b0\strike\f0\fs16 Using the InstantQuery\cf2\strike0{\v Scribble300}\cf1\f0 ! \par \pard\b\f1\fs18 function \b0 CompanyOfCityCount(\b const \b0 CityId: \b string\b0 ): Integer; ! \par \b var\b0 ! \par InstantQuery: TInstantQuery; ! \par \b begin\b0 \par InstantQuery := InstantDefaultConnector.CreateQuery; ! \par \b try\b0 ! \par InstantQuery.Command := \i 'SELECT * FROM ANY TCompany WHERE City = :City'\i0 ; ! \par \i // Since this is a parameterized query, fetch the param definitions.\i0 \par InstantQuery.FetchParams(InstantQuery.Command, InstantQuery.Params); ! \par \i // Set the param values ! \par \i0 InstantQuery.Params.ParamByName('City').AsString := CityId; \par InstantQuery.Open; \par Result := InstantQuery.ObjectCount; ! \par \b finally\b0 \par InstantQuery.Free; ! \par \b end\b0 ; ! \par \b end\b0 ; \par \cf0\f2\fs20 \par \pard\plain\f2 Index: IOHelp.cnt =================================================================== RCS file: /cvsroot/instantobjects/Help/IOHelp.cnt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IOHelp.cnt 28 Oct 2005 09:07:32 -0000 1.3 --- IOHelp.cnt 28 Oct 2005 13:01:53 -0000 1.4 *************** *** 1,4 **** ! ;This help file was created with HelpScribble 7.5.1 ! ;Licensed to: CiBiSoft.com :BASE IOHelp.hlp --- 1,4 ---- ! ;This help file was created with HelpScribble 7.5.0 ! ;Licensed to: Steven Mitchell :BASE IOHelp.hlp *************** *** 106,109 **** --- 106,110 ---- 3 InstantConstArrayToVariant=327SI9P>MAIN 3 InstantDateTimeToStr=327SI9Q>MAIN + 3 InstantDefaultConnector=InstantDefaultConnector>MAIN 3 InstantDisableNotifiers=327SI9U>MAIN 3 InstantEnableNotifiers=327SI9W>MAIN *************** *** 119,122 **** --- 120,124 ---- 3 InstantIsIdentifier=3OA4HS.>MAIN 3 InstantIsValidObjectId=id_832>MAIN + 3 InstantMatchObject=InstantMatchObject>MAIN 3 InstantMatchObject=75DE_GZ>MAIN 3 InstantNameToClassName=327SI8T>MAIN *****... [truncated message content] |
From: Carlo B. <car...@us...> - 2005-10-28 09:13:04
|
Update of /cvsroot/instantobjects/Demos/ConsoleApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12060/Demos/ConsoleApp Added Files: IOConsoleDemo.dof IOConsoleDemo.dpr MinimalModel.xml Model.pas Log Message: Added a simple console application. --- NEW FILE: Model.pas --- unit Model; interface uses InstantPersistence; type TSimpleClass = class(TInstantObject) {IOMETADATA stored 'SIMPLE'; StringProperty: String(10) stored 'STRING'; } _StringProperty: TInstantString; private function GetStringProperty: string; procedure SetStringProperty(const Value: string); published property StringProperty: string read GetStringProperty write SetStringProperty; end; procedure CreateInstantModel; implementation procedure CreateInstantModel; var InstantClassMetadata : TInstantClassMetadata; InstantAttributeMetadata : TInstantAttributeMetadata; begin (* <TInstantClassMetadatas> <TInstantClassMetadata> <Name>TSimpleClass</Name> <Persistence>peStored</Persistence> <StorageName>SIMPLE</StorageName> <AttributeMetadatas> <TInstantAttributeMetadatas> <TInstantAttributeMetadata> <Name>StringProperty</Name> <AttributeType>atString</AttributeType> <IsIndexed>FALSE</IsIndexed> <IsRequired>FALSE</IsRequired> <Size>10</Size> <StorageName>STRING</StorageName> </TInstantAttributeMetadata> </TInstantAttributeMetadatas> </AttributeMetadatas> </TInstantClassMetadata> </TInstantClassMetadatas> *) InstantModel.ClassMetadatas.Create(InstantModel); InstantClassMetadata := InstantModel.ClassMetadatas.Add; InstantClassMetadata.Name := 'TSimpleClass'; InstantClassMetadata.Persistence := peStored; InstantClassMetadata.StorageName := 'SIMPLE'; InstantAttributeMetadata := InstantClassMetadata.AttributeMetadatas.Add; InstantAttributeMetadata.Name := 'StringProperty'; InstantAttributeMetadata.AttributeType := atString; InstantAttributeMetadata.IsIndexed := FALSE; InstantAttributeMetadata.IsRequired := FALSE; InstantAttributeMetadata.Size := 10; InstantAttributeMetadata.StorageName := 'STRING'; end; { TSimpleClass } function TSimpleClass.GetStringProperty: string; begin Result := _StringProperty.Value; end; procedure TSimpleClass.SetStringProperty(const Value: string); begin _StringProperty.Value := Value; end; initialization InstantRegisterClasses([ TSimpleClass ]); end. --- NEW FILE: MinimalModel.xml --- <TInstantClassMetadatas><TInstantClassMetadata><Name>TSimpleClass</Name><Persistence>peStored</Persistence><StorageName>SIMPLE</StorageName><AttributeMetadatas><TInstantAttributeMetadatas><TInstantAttributeMetadata><Name>StringProperty</Name><AttributeType>atString</AttributeType><IsIndexed>FALSE</IsIndexed><IsRequired>FALSE</IsRequired><Size>10</Size><StorageName>STRING</StorageName></TInstantAttributeMetadata></TInstantAttributeMetadatas></AttributeMetadatas></TInstantClassMetadata></TInstantClassMetadatas> --- NEW FILE: IOConsoleDemo.dof --- [FileVersion] Version=7.0 [Compiler] A=8 B=0 C=1 D=1 E=0 F=0 G=1 H=1 I=1 J=0 K=0 L=1 M=0 N=1 O=1 P=1 Q=0 R=0 S=0 T=0 U=1 V=1 W=0 X=1 Y=1 Z=1 ShowHints=1 ShowWarnings=1 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; NamespacePrefix= SymbolDeprecated=0 SymbolLibrary=1 SymbolPlatform=1 UnitLibrary=1 UnitPlatform=1 UnitDeprecated=1 HResultCompat=1 HidingMember=1 HiddenVirtual=1 Garbage=1 BoundsError=1 ZeroNilCompat=1 StringConstTruncated=1 ForLoopVarVarPar=1 TypedConstVarPar=1 AsgToTypedConst=1 CaseLabelRange=1 ForVariable=1 ConstructingAbstract=1 ComparisonFalse=1 ComparisonTrue=1 ComparingSignedUnsigned=1 CombiningSignedUnsigned=1 UnsupportedConstruct=1 FileOpen=1 FileOpenUnitSrc=1 BadGlobalSymbol=1 DuplicateConstructorDestructor=1 InvalidDirective=1 PackageNoLink=1 PackageThreadVar=1 ImplicitImport=1 HPPEMITIgnored=1 NoRetVal=1 UseBeforeDef=1 ForLoopVarUndef=1 UnitNameMismatch=1 NoCFGFileFound=1 MessageDirective=1 ImplicitVariants=1 UnicodeToLocale=1 LocaleToUnicode=1 ImagebaseMultiple=1 SuspiciousTypecast=1 PrivatePropAccessor=1 UnsafeType=0 UnsafeCode=0 UnsafeCast=0 [Linker] MapFile=0 OutputObjs=0 ConsoleApp=1 DebugInfo=0 RemoteSymbols=0 MinStackSize=16384 MaxStackSize=1048576 ImageBase=4194304 ExeDescription= [Directories] OutputDir= UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= SearchPath=..\..\Source\Core;..\..\Source\Brokers\XML Packages=vcl;rtl;dbrtl;dbexpress;vcldb;dsnap;vclactnband;VclSmp;dbxcds;libxml2D7;CBCommon70;ibxpress;IOCore;vclx;indy;adortl;dclaxserver;dxEdtrD7;teedb;tee;rbRCL77;rbDB77;DBXLISCOR70CL;visualclx;visualdbclx;CBVCL70;IOUIB Conditionals= DebugSourceDirs= UsePackages=0 [Parameters] RunParams= HostApplication= Launcher= UseLauncher=0 DebugCWD= RemoteHost=192.168.1.38 RemotePath=c:\programmi\cibisoft.com\scm\exe\sportclubmanager.exe [Language] ActiveLang= ProjectLang= RootDir=C:\Programmi\Borland\Delphi7\Bin\ [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1040 CodePage=1252 [Version Info Keys] CompanyName=CiBiSoft.com FileDescription=Global Selling Network FileVersion=1.0.0.0 InternalName=GSN LegalCopyright=Copyright © 2005 CiBiSoft.com LegalTrademarks= OriginalFilename= ProductName=Global Selling Network ProductVersion=1.0 Comments= [Excluded Packages] c:\programmi\borland\delphi7\Projects\Bpl\CBLiscor.bpl=*** Componenti CiBiSoft e Liscor condivisi *** c:\programmi\borland\delphi7\Projects\Bpl\CBXslFop70.bpl=*** XSLFOP Package Delphi 7: XSL & FOP utilities *** C:\Programmi\Borland\Delphi7\Bin\DBXLISCOR70CL.bpl=**** DBX Corelab Components (FORWARD) for Delphi 7 ***** c:\programmi\borland\delphi7\Bin\DBXLISCOR70DCL.bpl=**** DBX Corelab design-time property-editors (FORWARD) for Delphi 7 ***** c:\programmi\borland\delphi7\Bin\DBXLSFORMS70CL.bpl=**** DBX Corelab Forms Repository (FORWARD) for Delphi 7 ***** c:\programmi\borland\delphi7\Projects\Bpl\CBDesign70.bpl=*** Design-time property-editors Delphi 7 per CBVCL *** c:\programmi\borland\delphi7\Projects\Bpl\CBCLX70.bpl=** CBCLX Package Delphi 7: CLX components ** c:\programmi\borland\delphi7\Projects\Bpl\CBRBuilder70.bpl=*** CBRBuilderVCL ReportBuilder VCL Support *** c:\programmi\borland\delphi7\Projects\Bpl\OOoPackage70.bpl=* Ethea - OpenOffice.org Components * C:\WINDOWS\system32\rbIBE77.bpl=ReportBuilder Data Access for Interbase Express [HistoryLists\hlConditionals] Count=7 Item0=CBVCL;NOACE;IOUIB;IOIBX;REGVERSION;DEBUG Item1=CBVCL;NOACE;IOUIB;REGVERSION;DEBUG Item2=CBVCL;NOACE;IOUIB;REGVERSION Item3=CBVCL;NOACE;IOIBX;REGVERSION Item4=CBVCL;NOACE;IOIBX;DEBUG Item5=CBVCL;NOACE;IOIBX Item6=CBVCL [HistoryLists\hlUnitAliases] Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; [HistoryLists\hlSearchPath] Count=5 Item0=..\..\Source\Core;..\..\Source\Brokers\XML Item1=..\..\Source\Core;..\..\Source\Brokers\BDE Item2=..\..\..\Source\Core;..\..\..\Source\Brokers\BDE Item3=..\..\..\Source\Core Item4=$(DELPHI)\Lib\Debug --- NEW FILE: IOConsoleDemo.dpr --- (* * InstantObjects - IOConsoleDemo * Using InstantObjects without user interface * *) (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Initial Developer of the Original Code is: Carlo Barazzetta * * Contributor(s): * * ***** END LICENSE BLOCK ***** *) program IOConsoleDemo; {$APPTYPE CONSOLE} uses SysUtils, Model in 'Model.pas', InstantPersistence, InstantXML; {$R *.mdr} {Model} var ApplicationPath : string; Connection : TXMLFilesAccessor; Connector : TInstantXMLConnector; SimpleClass : TSimpleClass; Id : string; i : integer; begin ApplicationPath := ExtractFilePath(ParamStr(0)); Try //In every application the mdr file is normally included into the applications //by InstantObjects. //You can generate it at run-time calling, for example: //CreateInstantModel; //You read it from disk, for example: //InstantModel.LoadFromFile(ApplicationPath+'MinimalModel.xml'); //Connect to database Connection := nil; Connector := nil; Try Connection := TXMLFilesAccessor.Create(nil); Connection.RootFolder := ApplicationPath+'XMLStorage'; Connector := TInstantXMLConnector.Create(nil); Connector.Connection := Connection; Connector.LoginPrompt := False; Connector.IsDefault := True; WriteLn('Building Database structure'); Connector.BuildDatabase; WriteLn('Connecting to Database.'); Connector.Connect; for i := 0 to 100 do begin WriteLn('Storing Object.'); SimpleClass := TSimpleClass.Create; Try SimpleClass.StringProperty := IntToStr(Random(MaxInt)); SimpleClass.Store; Id := SimpleClass.Id; Finally SimpleClass.Free; End; WriteLn('Retrieving and changing Object.'); SimpleClass := TSimpleClass.Retrieve(Id); Try SimpleClass.StringProperty := IntToStr(Random(MaxInt)); SimpleClass.Store; Finally SimpleClass.Free; End; (* WriteLn('Retrieving and deleting Object.'); SimpleClass := TSimpleClass.Retrieve(Id); Try SimpleClass.Dispose; Finally SimpleClass.Free; End; *) end; WriteLn('Disconnecting from Database.'); Connector.Disconnect; Finally Connector.Free; Connection.Free; End; WriteLn('Done!'); Except on E: Exception do WriteLn(E.Message); End; end. |
From: Carlo B. <car...@us...> - 2005-10-28 09:13:04
|
Update of /cvsroot/instantobjects/Demos/ConsoleApp/XMLStorage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12060/Demos/ConsoleApp/XMLStorage Added Files: readme.txt Log Message: Added a simple console application. --- NEW FILE: readme.txt --- XML storage folder for IOConsole demo. |
From: Carlo B. <car...@us...> - 2005-10-28 09:10:36
|
Update of /cvsroot/instantobjects/Demos/ConsoleApp/XMLStorage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11487/XMLStorage Log Message: Directory /cvsroot/instantobjects/Demos/ConsoleApp/XMLStorage added to the repository |
From: Carlo B. <car...@us...> - 2005-10-28 09:10:28
|
Update of /cvsroot/instantobjects/Demos/ConsoleApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11457/ConsoleApp Log Message: Directory /cvsroot/instantobjects/Demos/ConsoleApp added to the repository |
From: Carlo B. <car...@us...> - 2005-10-28 09:09:34
|
Update of /cvsroot/instantobjects/Demos/Test/BuildPrimerDatabase In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11219/Demos/Test/BuildPrimerDatabase Modified Files: BuildPrimerDatabase.dpr Connections.xml UBuilder.pas Log Message: Fixed BuildPrimerDatabase demo Index: UBuilder.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/Test/BuildPrimerDatabase/UBuilder.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UBuilder.pas 3 Feb 2005 22:50:04 -0000 1.1 --- UBuilder.pas 28 Oct 2005 09:09:26 -0000 1.2 *************** *** 4,14 **** uses ! InstantPersistence; ! function Connect(const ConnectionFileName, ConnectionName : string) : TInstantConnector; ! procedure BuildDatabase(Connector : TInstantConnector); procedure CreateRandomContacts(Count: Integer; LoadPictures : boolean = False; const PicturePath : string = ''); implementation --- 4,21 ---- uses ! InstantPersistence, Classes; ! procedure BuildAndConnect(const ConnectionFileName, ConnectionName : string); procedure CreateRandomContacts(Count: Integer; LoadPictures : boolean = False; const PicturePath : string = ''); + type + TConnectorEventsProvider = class(TComponent) + procedure ConnectionManagerConnect(Sender: TObject; + var ConnectionDef: TInstantConnectionDef; var Result: Boolean); + procedure ConnectionManagerDisconnect(Sender: TObject; + var ConnectionDef: TInstantConnectionDef; var Result: Boolean); + end; + implementation *************** *** 38,65 **** {$ENDIF} {$IFDEF LINUX} ! QGraphics, {$ENDIF} ! InstantConnectionManager, InstantClasses, ! Classes, Contnrs, DemoData, RandomData, Model; var ConnectionManager : TInstantConnectionManager; ! function Connect(const ConnectionFileName, ConnectionName : string) : TInstantConnector; ! var ! ConnectionDef : TInstantConnectionDef; begin - Result := nil; // To use XML format for ConnectionManager file: ConnectionManager.FileFormat := sfXML; ConnectionManager.FileName := ConnectionFileName; ! ConnectionManager.LoadConnectionDefs; ! ConnectionDef := ConnectionManager.ConnectionDefs.Find(ConnectionName) as TInstantConnectionDef; ! if Assigned(ConnectionDef) then ! begin ! ConnectionManager.CurrentConnectionDef := ConnectionDef; ! Result := ConnectionDef.CreateConnector(nil); ! end; end; --- 45,65 ---- {$ENDIF} {$IFDEF LINUX} ! QGraphics, {$ENDIF} ! InstantConnectionManager, InstantClasses, ! Contnrs, DemoData, RandomData, Model; var ConnectionManager : TInstantConnectionManager; + ConnectorEventsProvider : TConnectorEventsProvider; + FConnector : TInstantConnector; ! procedure BuildAndConnect(const ConnectionFileName, ConnectionName : string); begin // To use XML format for ConnectionManager file: ConnectionManager.FileFormat := sfXML; ConnectionManager.FileName := ConnectionFileName; ! ConnectionManager.ConnectByName(ConnectionName);// CurrentConnectionDef := ConnectionDef; end; *************** *** 172,178 **** end; end; ! initialization ConnectionManager := TInstantConnectionManager.Create(nil); {$IFDEF MSWINDOWS} InstantRegisterGraphicClass(gffJpeg, TJPEGImage); --- 172,213 ---- end; end; + { TConnectorEventsProvider } ! procedure TConnectorEventsProvider.ConnectionManagerConnect( ! Sender: TObject; var ConnectionDef: TInstantConnectionDef; ! var Result: Boolean); ! begin ! FConnector := ConnectionDef.CreateConnector(Self); ! try ! FConnector.IsDefault := True; ! //prima di connettermi creo il database ! FConnector.BuildDatabase; ! //poi mi connetto ! FConnector.Connect; ! FConnector.IsDefault := True; ! Result := True; ! except ! FreeAndNil(FConnector); ! raise; ! end; ! end; ! ! procedure TConnectorEventsProvider.ConnectionManagerDisconnect( ! Sender: TObject; var ConnectionDef: TInstantConnectionDef; ! var Result: Boolean); ! begin ! if Assigned(FConnector) then ! begin ! FConnector.Disconnect; ! FreeAndNil(FConnector); ! end; ! end; ! ! initialization ConnectionManager := TInstantConnectionManager.Create(nil); + ConnectorEventsProvider := TConnectorEventsProvider.Create(nil); + ConnectionManager.OnConnect := ConnectorEventsProvider.ConnectionManagerConnect; + ConnectionManager.OnDisconnect := ConnectorEventsProvider.ConnectionManagerDisconnect; + {$IFDEF MSWINDOWS} InstantRegisterGraphicClass(gffJpeg, TJPEGImage); *************** *** 181,184 **** --- 216,220 ---- finalization ConnectionManager.Free; + ConnectorEventsProvider.Free; end. Index: Connections.xml =================================================================== RCS file: /cvsroot/instantobjects/Demos/Test/BuildPrimerDatabase/Connections.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Connections.xml 3 Feb 2005 22:50:04 -0000 1.1 --- Connections.xml 28 Oct 2005 09:09:26 -0000 1.2 *************** *** 1,23 **** <TInstantConnectionDefs> - <TInstantIBXConnectionDef> - <Name>IBX FB</Name> - <IsBuilt>TRUE</IsBuilt> - <LoginPrompt>FALSE</LoginPrompt> - <Path>C:\IBDATA\PRIMER.FDB</Path> - <NetType>ntLocal</NetType> - <Options></Options> - <Params>User_Name=SYSDBA - password=a</Params> - </TInstantIBXConnectionDef> <TInstantBDEConnectionDef> ! <Name>BDE PARADOX</Name> <IsBuilt>TRUE</IsBuilt> <BlobStreamFormat>sfXML</BlobStreamFormat> <LoginPrompt>FALSE</LoginPrompt> <DriverName>STANDARD</DriverName> ! <Parameters>PATH=D:\BDEBROKER DEFAULT DRIVER=PARADOX ENABLE BCD=TRUE </Parameters> </TInstantBDEConnectionDef> ! </TInstantConnectionDefs> --- 1,24 ---- <TInstantConnectionDefs> <TInstantBDEConnectionDef> ! <Name>ParadoxDB</Name> <IsBuilt>TRUE</IsBuilt> <BlobStreamFormat>sfXML</BlobStreamFormat> <LoginPrompt>FALSE</LoginPrompt> <DriverName>STANDARD</DriverName> ! <Parameters>PATH=..\..\PrimerCross\ParadoxDB DEFAULT DRIVER=PARADOX ENABLE BCD=TRUE </Parameters> </TInstantBDEConnectionDef> ! <TInstantIBXConnectionDef> ! <Name>FirebirdDB</Name> ! <IsBuilt>TRUE</IsBuilt> ! <BlobStreamFormat>sfXML</BlobStreamFormat> ! <LoginPrompt>FALSE</LoginPrompt> ! <Path>..\..\PrimerCross\FirebirdDB\PRIMERDB.FDB</Path> ! <NetType>ntLocal</NetType> ! <Options>ibxUseDelimitedIdents</Options> ! <Params>User_Name=SYSDBA ! Password=masterkey</Params> ! </TInstantIBXConnectionDef> ! </TInstantConnectionDefs> \ No newline at end of file Index: BuildPrimerDatabase.dpr =================================================================== RCS file: /cvsroot/instantobjects/Demos/Test/BuildPrimerDatabase/BuildPrimerDatabase.dpr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BuildPrimerDatabase.dpr 3 Feb 2005 22:50:04 -0000 1.1 --- BuildPrimerDatabase.dpr 28 Oct 2005 09:09:26 -0000 1.2 *************** *** 14,18 **** var - Connector : TInstantConnector; ApplicationPath : string; Count : integer; --- 14,17 ---- *************** *** 28,70 **** raise Exception.Create('Connection Name Missing'); ! Connector := UBuilder.Connect(ConnectionFile, ParamStr(1)); ! ! if Connector = nil then ! raise Exception.CreateFmt('Connection definition for "%s" not found in %s',[ParamStr(1),ConnectionFile]); ! ! WriteLn('Building Database structure... please wait.'); ! //Build Database (empty all data) ! UBuilder.BuildDatabase(Connector); ! //Set default connector ! Connector.IsDefault := True; ! ! WriteLn('Connecting to Database.'); ! //Open connection ! Connector.Connect; ! ! if ParamStr(2) <> '' then ! Count := StrToInt(ParamStr(2)) ! else ! Count := 100; ! if SameText(ParamStr(3),'/pictures') then ! begin ! //Populate Database with Random-Data and Pictures ! WriteLn(Format('Building %d Contacs with Pictures... please wait.',[Count])); ! UBuilder.CreateRandomContacts(Count, True, ApplicationPath+'..\..\PrimerCross\Pictures\'); ! end ! else ! begin ! //Populate Database with Random-Data, without Pictures ! WriteLn(Format('Building %d Contacs without Pictures... please wait.',[Count])); ! UBuilder.CreateRandomContacts(Count); ! end; ! //Close connection ! Connector.Disconnect; ! WriteLn('Done!'); ! Except ! on E: Exception do WriteLn(E.Message); ! End; ! end. --- 27,56 ---- raise Exception.Create('Connection Name Missing'); ! WriteLn('Building Database structure and connect... please wait.'); ! UBuilder.BuildAndConnect(ConnectionFile, ParamStr(1)); ! if ParamStr(2) <> '' then ! Count := StrToInt(ParamStr(2)) ! else ! Count := 100; ! if SameText(ParamStr(3),'/pictures') then ! begin ! //Populate Database with Random-Data and Pictures ! WriteLn(Format('Building %d Contacs with Pictures... please wait.',[Count])); ! UBuilder.CreateRandomContacts(Count, True, ApplicationPath+'..\..\PrimerCross\Pictures\'); ! end ! else ! begin ! //Populate Database with Random-Data, without Pictures ! WriteLn(Format('Building %d Contacs without Pictures... please wait.',[Count])); ! UBuilder.CreateRandomContacts(Count); ! end; ! //Close connection ! InstantDefaultConnector.Disconnect; ! WriteLn('Done!'); ! Except ! on E: Exception do WriteLn(E.Message); ! End; ! end. |
From: Carlo B. <car...@us...> - 2005-10-28 09:07:41
|
Update of /cvsroot/instantobjects/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10734/Help Modified Files: IOHelp.cnt IOHelp.hsc Log Message: Updated help files: translated italian topic by Nando. Index: IOHelp.cnt =================================================================== RCS file: /cvsroot/instantobjects/Help/IOHelp.cnt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOHelp.cnt 28 Oct 2005 05:07:51 -0000 1.2 --- IOHelp.cnt 28 Oct 2005 09:07:32 -0000 1.3 *************** *** 1,4 **** ! ;This help file was created with HelpScribble 7.5.0 ! ;Licensed to: Steven Mitchell :BASE IOHelp.hlp --- 1,4 ---- ! ;This help file was created with HelpScribble 7.5.1 ! ;Licensed to: CiBiSoft.com :BASE IOHelp.hlp Index: IOHelp.hsc =================================================================== RCS file: /cvsroot/instantobjects/Help/IOHelp.hsc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOHelp.hsc 28 Oct 2005 05:07:51 -0000 1.2 --- IOHelp.hsc 28 Oct 2005 09:07:32 -0000 1.3 *************** *** 1,5 **** HelpScribble project file. 13 ! `grira Zvgpuryy-0Q4954 0 1 --- 1,5 ---- HelpScribble project file. 13 ! PvOv`bsg.pbz-16O773 0 1 *************** *** 10,14 **** TRUE 0x0409 English (U.S.) ! D:\L\InstantObjects\Help 1 BrowseButtons() --- 10,14 ---- TRUE 0x0409 English (U.S.) ! D:\ETHEA\InstantObjects\trunk\Help 1 BrowseButtons() *************** *** 380,422 **** ! Writing FALSE ! 34 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fnil Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fswiss Arial;}{\f3\fnil\fcharset0 Arial;}{\f4\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\b\f0\fs26 Example 1\b0\fs20 \par \cf1\strike\f1\fs16 Adding Business Rules\strike0\f2\{link=327SA3V>main\}\{keepn\} \cf0\f0\fs20 ! \par \f3 Normalmente i controlli sui campi vengono fatti negli eventi OnValidate e OnChange. Fortunatamente con InstantObjects non bisogna pi\'f9 utilizzare questo sistema ma si utilizza normalmente il Setter dell'attributo di un oggetto: \par ! \par \f4 procedure TAddress.SetPostalCode(const Value: string); ! \par begin ! \par //OnValidate ! \par if (Length(Value) <> 6) and (Value <> '') then ! \par raise Exception.Create('Postal Code must be filled with 6 chars'); ! \par ! \par _PostalCode.Value := Value; <-- codice scritto automaticamente da InstantObjects ! \par ! \par //OnChange ! \par if (Value <> '') and (City = '') then \par GetDefaultCityByPostalCode(Value); ! \par end; \par \f0 ! \par \f3 Quando invece occorre fare controlli "incrociati" su pi\'f9 attributi \'e8 consigliabile utilizzare il metodo BeforeStore (Look at \cf2\strike Example 2\cf3\strike0\{linkID=130\}\cf0 ) \par ! \par N.B. attenzione al codice che si scrive dentro il Setter di un attributo: esso non viene invocato solo in fase di modifica, ma ogni volta che un Exposer aggiorna l'oggetto corrente. \par - \par Ad esempio se si vuole svuotare la data pi\'f9 alta di un range di due date quando l'utente modifica la prima si potrebbe scrivere: - \par \f4 procedure TShipment.SetMinShipDate(const Value: TDateTime); - \par begin - \par _MinShipDate.Value := Value; <-- codice scritto automaticamente da InstantObjects - \par - \par if (Value = 0) then - \par MaxShipDate := 0; - \par end; - \par \f3 Ma la \f4 MaxShipDate verr\'e0 azzerata anche se l'utente non "modifica" SetMinShipDate, quando l'oggetto viene caricato da un Exposer con LoadFields. L'errore \'e8 concettuale: la logica di business si deve preoccupare solo della correttezza dei dati, quindi in questo caso si dovrebbe solo controllare che la MinShipDate non deve superare la MaxShipDate e questo controllo andrebbe fatto in BeforeStore. - \par Se si vuole ottenere l'effetto desiderato occorre agire a livello di "interfaccia utente" e quindi a livello di evento OnChange del field sull'Exposer che mostra gli attributi di un oggetto.\f0 \par } 130 --- 380,421 ---- ! Testing FALSE ! 33 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fnil Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fswiss Arial;}{\f3\fnil\fcharset0 Arial;}{\f4\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\b\f0\fs26 Example 1\b0\fs20 \par \cf1\strike\f1\fs16 Adding Business Rules\strike0\f2\{link=327SA3V>main\}\{keepn\} \cf0\f0\fs20 ! \par \f3 In InstantObject you usually apply single-attribute business rules in the attribute's property setter method: \par ! \par \b\f4 procedure\b0 TAddress.SetPostalCode(\b const \b0 Value: \b string\b0 ); ! \par \b begin\b0 ! \par \i // Validation: raise exceptions to prevent value assignment. ! \par \i0 \b if \b0 (Length(Value) <> 6) \b and \b0 (Value <> '') \b then\b0 ! \par \b raise \b0 Exception.Create(\i 'Postal Code must be filled with 6 chars'\i0 ); ! \par \i // Assignment: this code will usually be written by InstantObjects automatically. ! \par \i0 _PostalCode.Value := Value; ! \par \i // Post-assignment: do things as a consequence of an attribute's value change ! \par // (see also the virtual method AttributeChanged). ! \par \i0 \b if \b0 (Value <> '') \b and \b0 (City = '') \b then\b0 \par GetDefaultCityByPostalCode(Value); ! \par \b end\b0 ; \par \f0 ! \par \f3 If you need to apply business rules that involve more than one attribute, instead, you often use the BeforeStore virtual method(see \cf2\strike Example 2\cf3\strike0\{linkID=130\}\cf0 ). \par ! \par When you code side effects, be aware that the property setters might be called more often than expected, for example when reading an object from an XML file or when you use the data-aware presentation layer. Here is an example: ! \par ! \par \b\f4 procedure \b0 TShipment.SetMinShipDate(\b const \b0 Value: TDateTime); ! \par \b begin\b0 ! \par \i // Assignment: this code will usually be written by InstantObjects automatically. ! \par \i0 _MinShipDate.Value := Value; ! \par MaxShipDate := 0; ! \par \b end\b0 ; ! \par \f3 ! \par The intent of this code is to reset MaxShipDate whenever MinShipDate changes, so that a user, in a hypothetical data-entry scenario, will have to re-enter a value for MaxShipDate. But things might not work always as expected; for example, SetMinShipDate might be called after SetMaxShipDate when streaming in an object from a XML file, of when using the "undo" feature of the data-aware presentation layer. The lesson here is: use the property setters and the BeforeStore method only to appy real business rules (like "MaxShipDate must be equal to or greater than MinShipDate"), and code data-entry rules (like "whenever a value for MinShipDate is entered, MaxShipDate should be reset") at the data-entry level (that is, not in the model classes). \par \par } 130 *************** *** 427,431 **** ! Writing --- 426,430 ---- ! Testing *************** *** 437,458 **** \viewkind4\uc1\pard\b\f0\fs26 Example 2\b0\fs20 \par \cf1\strike\f1\fs16 Adding Business Rules\strike0\f2\{link=327SA3V>main\}\{keepn\} ! \par \cf0\f3\fs20 Per controllare i dati prima di memorizzare l'oggetto si utilizza di solito il metodo BeforeStore. Questo metodo di norma contiene i controlli che vengono scritti nell'evento BeforePost in una applicazione basata sui dataset. \par ! \par \f4 procedure TCountry.BeforeStore; ! \par begin ! \par if Id = '' then ! \par raise Exception.Create('Country ID missing'); ! \par inherited; ! \par end; \par \f0 ! \par \f3 Per inizializzare i dati di un oggetto si utilizza di solito il metodo AfterCreate: ! \par \f4 procedure TContact.AfterCreate; ! \par begin ! \par inherited; ! \par Id := InstantGenerateId; ! \par _Category.ReferenceObject(TCategory, 'CAT000'); ! \par end; ! \par \f3 Da notare che AfterCreate non viene chiamato quando un oggetto viene letto (Retrieve) dallo storage: in quel caso viene invocato il metodo AfterRetrieve. \par \f0 \par } 140 --- 436,457 ---- \viewkind4\uc1\pard\b\f0\fs26 Example 2\b0\fs20 \par \cf1\strike\f1\fs16 Adding Business Rules\strike0\f2\{link=327SA3V>main\}\{keepn\} ! \par \cf0\f3\fs20 Business rules that involve more than one attribute are usually applied in BeforeStore, which gets called whenever the Store method is called to write an object (back) to the storage. Example: \par ! \par \b\f4 procedure \b0 TShipment.BeforeStore; ! \par \b begin\b0 ! \par \b if \b0 MinShipDate > MaxShipDate \b then\b0 ! \par \b raise \b0 Exception.Create(\i 'Date range error'\i0 ); ! \par \b inherited\b0 ; ! \par \b end\b0 ; \par \f0 ! \par \f3 You initialize an object by overriding Initialize (if you need to apply initialization code both when a new object is created and when it is retrieved from the storage), or AfterCreate (if you need to apply initialization code for newly created objects only). There is also an AfterRetrieve method that you can override to apply initialization code only when an existing object read from the storage and materialized in memory. Here is an example of AfterCreate: \par \f0 + \par \b\f4 procedure \b0 TContact.AfterCreate; + \par \b begin\b0 + \par \b inherited\b0 ; + \par Id := InstantGenerateId; + \par Category := TCategory.Retrieve(\i 'CAT000'\i0 ); + \par \b end\b0 ; + \par \f3 \par } 140 *************** *** 463,472 **** creatingbusinessmodel:000070 ! Writing FALSE ! 23 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red128\green0\blue0;} --- 462,471 ---- creatingbusinessmodel:000070 ! Testing FALSE ! 21 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red128\green0\blue0;} *************** *** 481,492 **** \par \cf2\{bmc ConnectionDefEditor.gif\}\cf1 \par \f1 Define the connection properties and store the connection definition.\f0 - \par \par \ul\b\f1 Building a Model into a database\ulnone\b0\f0 ! \par \f1 Select the Broker/Connection do you want to use to Build your database and press "Build" button. A "Database Builder" window appears. You can show the building steps a run the building process. \b Be careful: all data will be lost!\b0 \par \cf2\{bml DatabaseBuilder.gif\}\cf1 ! \par ! \par \ul\b Evolve a Model into an existing database\ulnone\b0\f0 ! \par \f1 Select the Broker/Connection do you want to use to Build your database and press "Evolve" button. A "Database Evolver" window similar to the "Database Builder" windows appears. You can show the evolving steps needed to upgrade the database structure. Run the evolve process. ! \par \b All data is preserved into database. \par \par \b0\f0 --- 480,489 ---- \par \cf2\{bmc ConnectionDefEditor.gif\}\cf1 \par \f1 Define the connection properties and store the connection definition.\f0 \par \ul\b\f1 Building a Model into a database\ulnone\b0\f0 ! \par \f1 Select the Broker/Connection you want to use to Build your database and press the "Build" button. A "Database Builder" window appears. You can see the building steps and run the building process. \b Be careful: all data will be lost!\b0 \par \cf2\{bml DatabaseBuilder.gif\}\cf1 ! \par \ul\b Evolving an existing database\ulnone\b0\f0 ! \par \f1 If you build the database, put some data in it and later you change the model, you need to "evolve" the database. Unlike the Build procedure, which will basically destroy and recreate all database objects, the Evolution process will try to save the data. The effectiveness of the Evolution procedure depends on the features of the particular kind of database you are using. For example, if your SQL database server allows you to alter the size of a column with a SQL/DDL statement, then InstantObjects will be able to do it, otherwise it won't. There are plans to improve the evolution process so that it overcomes the limitations of the database. In our example, IO's database evolver could add a new temporary column, copy the old data into it, then drop the old column, recreate it and pump the data back, finally dropping the temporary column. ! \par To evolve an existing database, select the Broker/Connection you want to use and press the "Evolve" button. A "Database Evolver" window similar to the "Database Builder" window appears. You can see the evolution steps needed to upgrade the database structure, selectively disable some of them (useful in special cases) and apply them to the database. \b In this case no data is lost. \par \par \b0\f0 *************** *** 499,503 **** creatinguserinterface:000010 ! Writing --- 496,500 ---- creatinguserinterface:000010 ! Testing *************** *** 543,547 **** creatinguserinterface:000020 ! Writing --- 540,544 ---- creatinguserinterface:000020 ! Testing *************** *** 565,581 **** creatinguserinterface:000030 ! Writing FALSE ! 21 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 The Connector \cf1\b0\fs16 \par \strike Creating the User Interface\strike0\{link=75DE_G4>main\}\{keepn\} ! \par \pard\sb25\sa25\f1\fs18 Qui andrebbe spiegato un po' meglio il ruolo di un broker. A quanto pare la versione 1.0 non aveva il TInstantBroker\f0 ! \par ! \par In order for your application to use the database as object storage, you must use a connector component. The connector acts as a gateway between your application and the database, managing all the objects that are stored to and retrieved from the database. A connector component for each type of data access layer that is supported by InstantObjects is available on the component palette. A connector is attached to a database by assigning a connection component to its Connection property. Each connector component supports its own connection type: \par \par \pard\sb25\sa25\tx1980\tx4800\b Access type\tab Connector type\tab\f1 Type of \f0 Connection\b0 --- 562,576 ---- creatinguserinterface:000030 ! Testing FALSE ! 20 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 The Connector \cf1\b0\fs16 \par \strike Creating the User Interface\strike0\{link=75DE_G4>main\}\{keepn\} ! \par \pard\sb25\sa25\fs18 In order for your application to use the database as object storage, you must use a connector component. The connector acts as a gateway between your application and the database\f1 (by means of an internal component called the broker)\f0 , managing all the objects that are stored to and retrieved from the database. A connector component for each type of data access layer that is supported by InstantObjects is available on the component palette. A connector is attached to a database by assigning a connection component to its Connection \f1 (or equivalent) \f0 property. Each connector component supports its own connection type\f1 . For example:\f0 \par \par \pard\sb25\sa25\tx1980\tx4800\b Access type\tab Connector type\tab\f1 Type of \f0 Connection\b0 *************** *** 586,594 **** \par \f1 XML\tab\cf0\f0 TInstantX\f1 ML\f0 Connector\cf1\tab TXMLFilesAccessor \par \pard ! \par \f1 Sono disponibili altri brokers come NexusDB, UIB, ZeosDBO, ecc... per l'utilizzo di database e tecnologie di accesso ai dati alternativea quelle fornite con Delphi.\f0 ! \par ! \par Drop an appropriate connector component and a matching connection component on a form or a data module in your project. Configure the connection component to access the database and assign it to the Connection property of the connector component. The connector will use the connection to gain access to the database. By setting the IsDefault property to True, the connector will be used as the default connector in the application. \par ! \par \f1 E' anche possibile usare il TInstantConnectionManager invece che utilizzare direttamente un connector se si vuole mantenere una totale indipendenza dell'applicazione da una specifica tecnologia come mostrato nel Primer demo.\f0 \par } 190 --- 581,590 ---- \par \f1 XML\tab\cf0\f0 TInstantX\f1 ML\f0 Connector\cf1\tab TXMLFilesAccessor \par \pard ! \par \f1 InstantObjects supports a variety of databases and data-access technologies (for example NexusDB, ZeosDBO, Unified InterBase...) by means of packages called brokers. You can build and install the broker(s) you need from the Brokers sub-folder of InstantObjects's Source folder. ! \par \f0 ! \par Drop an appropriate connector component and a matching connection component on a form or a data module in your project. Configure the connection component to access the database and assign it to the Connection \f1 (or equivalent) \f0 property of the connector component. The connector will use the connection to gain access to the database. By setting the IsDefault property to True, the connector will be used as the default connector in the application. \par ! \par \f1 You can also use TInstantConnectionManager, which stores connection data in external files and can create connectors and connections automatically based on this data. This is particularly useful when you don't want to hardcode a particular broker or set of brokers into your program. See the Primer demo application for an example of this technique. ! \par \f0 \par } 190 *************** *** 599,603 **** creatinguserinterface:000040 ! Writing --- 595,599 ---- creatinguserinterface:000040 ! Testing *************** *** 605,609 **** FALSE 13 ! {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\lang1040\b\f0\fs24 The Exposer \b0\fs16 --- 601,605 ---- FALSE 13 ! {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\lang1040\b\f0\fs24 The Exposer \b0\fs16 *************** *** 612,618 **** \par Attributes defined in the business model are accessed through properties. Properties that are published can be accessed by data-aware controls via this component. In addition, the content of container attributes can be accessed too. The exposer component maps the published properties of objects to fields in a dataset. The objects being exposed are represented as rows in the dataset. \par To expose an object, it must be assigned to the Subject property of a \strike TInstantExposer\strike0\{linkID=6300>main\}. To expose multiple objects contained within another object, assign the main object to the Subject property and enter content mode by changing the Mode property from amObject to amContent. If the exposed class has no default container, specify the desired container in the property ContainerName. Specify the class of the exposed object(s) in the property ObjectClassName. ! \par By default, an exposer will make all simple properties of each exposed object as well as any related object available through fields in the dataset. Every field will have a fieldname matching the property it represents. For related objects, the fieldname will be the complete path to the property using regular dot notation. The property FieldOptions and the event OnIncludeField allow you to limit or extend the number fields to include. \par Container attributes of exposed objects are automatically recognized by the exposer and represented as nested datasets within the exposer. ! \par Exposers can be linked together in master/detail relations. To link one exposer to another, assign the master exposer to the DataSet property of a TDataSource and assign the TDataSource to the MasterSource property of the detail exposer. The Subject of the detail exposer will be set to the current object of the master exposer, whenever this changes. If you want the detail exposer to expose an object that is related to the current object of the master exposer instead, simply specify the desired property path in MasterProperty. \par \strike TInstantExposer\strike0\{linkID=6300>main\} is not limited to exposing \strike TInstantObject\strike0\{linkID=7240>main\} descendants. Any object with published propertied can be exposed. The content of standard VCL containers like TList, TObjectList and TCollection can be exposed in content mode. \par --- 608,614 ---- \par Attributes defined in the business model are accessed through properties. Properties that are published can be accessed by data-aware controls via this component. In addition, the content of container attributes can be accessed too. The exposer component maps the published properties of objects to fields in a dataset. The objects being exposed are represented as rows in the dataset. \par To expose an object, it must be assigned to the Subject property of a \strike TInstantExposer\strike0\{linkID=6300>main\}. To expose multiple objects contained within another object, assign the main object to the Subject property and enter content mode by changing the Mode property from amObject to amContent. If the exposed class has no default container, specify the desired container in the property ContainerName. Specify the class of the exposed object(s) in the property ObjectClassName. ! \par By default, an exposer will make all simple properties of each exposed object as well as any related object available through fields in the dataset. Every field will have a \f1 F\f0 ield\f1 N\f0 ame matching the property it represents. For related objects, the fieldname will be the complete path to the property using regular dot notation. The property FieldOptions and the event OnIncludeField allow you to limit or extend the number fields to include. \par Container attributes of exposed objects are automatically recognized by the exposer and represented as nested datasets within the exposer. ! \par Exposers can be linked together in master/detail relation\f1 ships\f0 . To link one exposer to another, assign the master exposer to the DataSet property of a TDataSource and assign the TDataSource to the MasterSource property of the detail exposer. The Subject of the detail exposer will be set to the current object of the master exposer, whenever this changes. If you want the detail exposer to expose an object that is related to the current object of the master exposer instead, simply specify the desired property path in MasterProperty. \par \strike TInstantExposer\strike0\{linkID=6300>main\} is not limited to exposing \strike TInstantObject\strike0\{linkID=7240>main\} descendants. Any object with published propertied can be exposed. The content of standard VCL containers like TList, TObjectList and TCollection can be exposed in content mode. \par *************** *** 625,634 **** creatinguserinterface:000050 ! Writing FALSE ! 48 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;} --- 621,630 ---- creatinguserinterface:000050 ! Testing FALSE ! 40 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;} *************** *** 636,640 **** \par \strike Creating the User Interface\strike0\{link=75DE_G4>main\}\{keepn\} \par \pard\sb25\sa25\fs18 The \strike TInstantSelector\strike0\{linkID=10050>main\} component allows you to select objects from the database and optionally expose them in the user interface. ! \par To select objects from the database, a command must be specified with the Command property. The syntax of this command is somewhat similar to an SQL SELECT-statement, \f1 called IQL, \f0 but instead of tables and columns, you specify classes and attributes: \par \pard\keep\f2 \par SELECT [DISTINCT] *|<Attribute> --- 632,636 ---- \par \strike Creating the User Interface\strike0\{link=75DE_G4>main\}\{keepn\} \par \pard\sb25\sa25\fs18 The \strike TInstantSelector\strike0\{linkID=10050>main\} component allows you to select objects from the database and optionally expose them in the user interface. ! \par To select objects from the database, a command must be specified with the Command property. The syntax of this command\f1 (called an IQL command, from Instant Query Language) \f0 is somewhat similar to an SQL SELECT-statement\f1 , \f0 but instead of tables and columns, you specify classes and attributes: \par \pard\keep\f2 \par SELECT [DISTINCT] *|<Attribute> *************** *** 643,678 **** \par [ORDER BY <Attribute list>] \par \pard\sb25\sa25\f0 - \par \par The simplest command that can be specified looks like this: \par \pard\keep\f2 \par SELECT * FROM TContact \par \pard\sb25\sa25\f0 ! \par ! \par This command would select all concrete instances of the class TContact. To select instances of TContact and any descendant class, add the ANY keyword: \par \pard\keep\f2 \par SELECT * FROM ANY Tcontact \par \pard\sb25\sa25\f0 ! \par ! \par If you want to select objects that are related to instances of a class, specify the relation attribute instead of the star, like this: \par \pard\keep\f2 \par SELECT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 - \par \par If the same object is related to from several objects via the specified attribute and you do not want it to appear more than once in the result, use the DISTINCT keyword with the attribute: \par \pard\keep\f2 \par SELECT DISTINCT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 - \par \par To select from objects that meet a certain criteria, you must add a WHERE clause to the command. This clause must contain an expression that evaluates to True or False. The expression can use attributes, constants and functions in combination with the most common operators. The following example will select all customers with a negative balance. \par \pard\keep\f2 \par SELECT * FROM TCustomer WHERE Balance < 0 \par \pard\sb25\sa25\f0 - \par \par To order the selected objects by one or more attributes, specify the attributes with ORDER BY: \par \pard\keep\f2 \par SELECT * FROM TCustomer ORDER BY Balance, Name \par \pard\sb25\sa25\f0 - \par - \par For an in-depth explanation of the Command property, please consult the InstantObjects Reference Guide. \par When the selector is opened, it performs a query against the database. The resulting objects are available via the Objects property. The number of objects selected can be read via the property ObjectCount. \par If you want to expose the selected objects in the user interface, simply assign the selector to a TDataSource that is attached to data-aware controls. --- 639,666 ---- \par [ORDER BY <Attribute list>] \par \pard\sb25\sa25\f0 \par The simplest command that can be specified looks like this: \par \pard\keep\f2 \par SELECT * FROM TContact \par \pard\sb25\sa25\f0 ! \par This command select\f1 s\f0 all concrete instances of the class TContact. To select instances of TContact and any descendant class, add the ANY keyword: \par \pard\keep\f2 \par SELECT * FROM ANY Tcontact \par \pard\sb25\sa25\f0 ! \par If you want to select objects that are related to instances of a class, specify the relation attribute instead of the \f1 *\f0 , like this: \par \pard\keep\f2 \par SELECT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 \par If the same object is related to from several objects via the specified attribute and you do not want it to appear more than once in the result, use the DISTINCT keyword with the attribute: \par \pard\keep\f2 \par SELECT DISTINCT Address FROM ANY Tcontact \par \pard\sb25\sa25\f0 \par To select from objects that meet a certain criteria, you must add a WHERE clause to the command. This clause must contain an expression that evaluates to True or False. The expression can use attributes, constants and functions in combination with the most common operators. The following example will select all customers with a negative balance. \par \pard\keep\f2 \par SELECT * FROM TCustomer WHERE Balance < 0 \par \pard\sb25\sa25\f0 \par To order the selected objects by one or more attributes, specify the attributes with ORDER BY: \par \pard\keep\f2 \par SELECT * FROM TCustomer ORDER BY Balance, Name \par \pard\sb25\sa25\f0 \par When the selector is opened, it performs a query against the database. The resulting objects are available via the Objects property. The number of objects selected can be read via the property ObjectCount. \par If you want to expose the selected objects in the user interface, simply assign the selector to a TDataSource that is attached to data-aware controls. *************** *** 686,690 **** programming:000010 ! Writing --- 674,678 ---- programming:000010 ! Done *************** *** 893,897 **** ! Imported --- 881,885 ---- ! Testing *************** *** 1027,1044 **** ! Writing FALSE ! 9 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\cf1\b\f0\fs24 Using the InstantQuery\b0\fs16 \par \strike Example 1\strike0\{linkID=310>example\}\tab\strike Programming with Persistent Objects\strike0\{linkID=210>main\}\cf2\{keepn\}\cf1 ! \par \cf0\fs18 TInstant\f1 Query\cf1\f0 \f1\'e8 una classe non disponibile sulla palette dei componenti di InstantObjects ma molto utile per la sua capacit\'e0 di estrarre una lista di oggetti dal database attraverso il linguaggio IQL, allo stesso modo di un \strike\f0 TInstantSelector\strike0\{linkID=10050>main\}\f1 . ! \par Il vantaggio sta nel fatto che gli oggetti non sono poi mappati sul buffer di un dataset ma sono disponibili in una lista della InstantQuery. E' quindi possibile utilizzarli per effettuare delle elaborazioni con prestazioni molto superiori all'utilizzo di un TInstantSelector. ! \par ! \par \f2 \par } 310 --- 1015,1031 ---- ! Testing FALSE ! 8 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\cf1\b\f0\fs24 Using the InstantQuery\b0\fs16 \par \strike Example 1\strike0\{linkID=310>example\}\tab\strike Programming with Persistent Objects\strike0\{linkID=210>main\}\cf2\{keepn\}\cf1 ! \par \cf0\f1\fs18 TInstantQuery is not available in Delphi's Component or Tool Palette, but it is useful to fetch a list of objects from the storage through an IQL query. TInstantQuery basically represents the core of \cf1 \strike\f0 TInstantSelector\strike0\{linkID=10050>main\}\f1 . ! \par The advantage in using TInstantQuery directly lies in the lower overhead, as there is no TDataSet buffer managerment involved. So, if you want to fetch objects and don't have a data-aware presentation layer, TInstantQuery is the preferred way to go. ! \par TInstantQuery is an abstract class. What you actually use are concrete descendant classes, which you instantiate through the connector's CreateQuery method.\f2 \par } 310 *************** *** 1049,1083 **** ! Writing FALSE ! 27 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset0 Courier New;}{\f3\fnil Arial;}} {\colortbl ;\red0\green128\blue0;\red128\green0\blue0;\red0\green0\blue0;} \viewkind4\uc1\pard\b\f0\fs24 Example 1 \par \cf1\b0\strike\f1\fs16 Using the InstantQuery\cf2\strike0\{linkID=300\}\cf3\f0\{keepn\} ! \par \f2\fs18 function CompanyOfCityCount(const CityId : string) : integer; ! \par var ! \par InstantQuery : TInstantQuery; ! \par begin ! \par //Create the InstantQuery \par InstantQuery := InstantDefaultConnector.CreateQuery; ! \par try ! \par //Assigning a IQL command ! \par InstantQuery.Command := 'SELECT * FROM ANY TCompany WHERE City = :City'; ! \par //If there are parameters into Command call FetchParams \par InstantQuery.FetchParams(InstantQuery.Command, InstantQuery.Params); ! \par //Setting param CityId ! \par InstantQuery.Params.ParamByName('City').AsString := CityId; \par InstantQuery.Open; \par Result := InstantQuery.ObjectCount; ! \par finally \par InstantQuery.Free; ! \par end; ! \par end; ! \par ! \par \par \cf0\f3\fs20 \par } --- 1036,1066 ---- ! Testing FALSE ! 23 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset0 Courier New;}{\f3\fnil Arial;}} {\colortbl ;\red0\green128\blue0;\red128\green0\blue0;\red0\green0\blue0;} \viewkind4\uc1\pard\b\f0\fs24 Example 1 \par \cf1\b0\strike\f1\fs16 Using the InstantQuery\cf2\strike0\{linkID=300\}\cf3\f0\{keepn\} ! \par \b\f2\fs18 function \b0 CompanyOfCityCount(\b const \b0 CityId: \b string\b0 ): Integer; ! \par \b var\b0 ! \par InstantQuery: TInstantQuery; ! \par \b begin\b0 \par InstantQuery := InstantDefaultConnector.CreateQuery; ! \par \b try\b0 ! \par InstantQuery.Command := \i 'SELECT * FROM ANY TCompany WHERE City = :City'\i0 ; ! \par \i // Since this is a parameterized query, fetch the param definitions.\i0 \par InstantQuery.FetchParams(InstantQuery.Command, InstantQuery.Params); ! \par \i // Set the param values ! \par \i0 InstantQuery.Params.ParamByName('City').AsString := CityId; \par InstantQuery.Open; \par Result := InstantQuery.ObjectCount; ! \par \b finally\b0 \par InstantQuery.Free; ! \par \b end\b0 ; ! \par \b end\b0 ; \par \cf0\f3\fs20 \par } |
From: Steven M. <sr...@us...> - 2005-10-28 05:08:01
|
Update of /cvsroot/instantobjects/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1605 Modified Files: IOHelp.cnt IOHelp.hsc Added Files: IOHelp.hlp IOHelp.hpj IOHelp.rtf Removed Files: io.cnt io.hlp io.hpj io.rtf Log Message: Help has now been renamed to IOHelp previous files have been deleted. Fixed bug - [ 1179112 ] Help file example incorrect. Added binary IOHelp.hlp file. Added also the .hpj and .rtf files. --- io.cnt DELETED --- --- io.rtf DELETED --- --- io.hpj DELETED --- --- NEW FILE: IOHelp.hpj --- ; InstantObjects Guide 2.0 ; ; This help file was created with HelpScribble 7.5.0 ; Licensed to: Steven Mitchell ; HelpScribble is copyright (c) 1996-2005 Jan Goyvaerts ; Visit http://www.helpscribble.com/ for more information [OPTIONS] REPORT=YES BMROOT=D:\L\InstantObjects\Help COMPRESS=True LCID=0x0409 CNT=IOHelp.cnt ROOT=D:\L\INSTAN~1\Help TITLE=InstantObjects Guide 2.0 [...1234 lines suppressed...] 8DW2.IP 12760 75DE_F1 12770 ID_628 12780 75DE_F2 12790 ID_653 12800 75DE_F3 12810 ID_5 12820 75DE_F4 12830 75DE_F5 12840 75DE_F6 12850 75DE_F7 12860 ID_413 12870 75DE_G8 12880 75DE_FZ 12890 8DW2.JP 12900 327SI7V 12910 75DE_G1 12920 75DE_G2 12930 75DE_G3 12940 --- io.hlp DELETED --- --- NEW FILE: IOHelp.rtf --- {\rtf1\ansi\deff0\deftab720{\fonttbl {\f0\fswiss Arial;} {\f1\fnil Courier New;} {\f2\fnil Arial;} {\f3\fmodern Courier New;} {\f4\fnil Symbol;} } {\colortbl ; \red0\green0\blue0; \red128\green0\blue0; \red0\green128\blue0; \red0\green0\blue255; } \par \pard\plain\f0 {\page} {\pard\plain\f0\fs20 [...20490 lines suppressed...] \par \pard\li195\sb15\sa25\fs16 Adds the individual strings of a delimited string to a TStrings object. \par \pard\keep\li95\sb25\sa25\strike\fs18 InstantStrToTime\strike0{\v 75DE_A1>main} \par \pard\li195\sb15\sa25\fs16 Converts a string to a TDateTime value. \par \par \pard\plain\f0 {\page} {\pard\plain\f0\fs20 {\up #}{\footnote {\up #} 75DE_G3} } \viewkind4\uc1\pard\keepn\sb25\lang1040\b\f0\fs24 Unit Overview \cf1\b0\fs16 \par \strike InstantUtils\strike0{\v 327SI7V>main} \par \pard\sb55\sa55\b\fs18 Types in Unit InstantUtils \par \pard\keep\li95\sb25\sa25\b0\strike TInstantCompareOption\strike0{\v 75DE_B3>main} \par \pard\li195\sb15\sa25\fs16 Specifies options for a comparison. \par \pard\keep\li95\sb25\sa25\strike\fs18 TInstantCompareOptions\strike0{\v 327SI8V>main} \par \pard\li195\sb15\sa25\fs16 Specifies options for a comparison. \par } Index: IOHelp.cnt =================================================================== RCS file: /cvsroot/instantobjects/Help/IOHelp.cnt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOHelp.cnt 24 Oct 2005 08:35:32 -0000 1.1 --- IOHelp.cnt 28 Oct 2005 05:07:51 -0000 1.2 *************** *** 1,4 **** ;This help file was created with HelpScribble 7.5.0 ! ;Licensed to: CiBiSoft.com :BASE IOHelp.hlp --- 1,4 ---- ;This help file was created with HelpScribble 7.5.0 ! ;Licensed to: Steven Mitchell :BASE IOHelp.hlp --- NEW FILE: IOHelp.hlp --- (This appears to be a binary file; contents omitted.) Index: IOHelp.hsc =================================================================== RCS file: /cvsroot/instantobjects/Help/IOHelp.hsc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOHelp.hsc 24 Oct 2005 08:35:32 -0000 1.1 --- IOHelp.hsc 28 Oct 2005 05:07:51 -0000 1.2 *************** *** 1,5 **** HelpScribble project file. 13 ! PvOv`bsg.pbz-16O773 0 1 --- 1,5 ---- HelpScribble project file. 13 ! `grira Zvgpuryy-0Q4954 0 1 *************** *** 9,14 **** TRUE ! ! D:\ETHEA\InstantObjects\Trunk\Help,D:\ETHEA\INSTAN~3\trunk\Help 1 BrowseButtons() --- 9,14 ---- TRUE ! 0x0409 English (U.S.) ! D:\L\InstantObjects\Help 1 BrowseButtons() *************** *** 899,903 **** FALSE 121 ! {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Example 1 \cf1\b0\fs16 --- 899,903 ---- FALSE 121 ! {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fmodern Courier New;}{\f2\fmodern\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Example 1 \cf1\b0\fs16 *************** *** 966,970 **** \par Result.AddPhone(Phone); \par ! \par \{\- Add colleagues \} \par with TInstantSelector.Create(nil) do \par try --- 966,970 ---- \par Result.AddPhone(Phone); \par ! \par \{\- Add colleagues\lang1033\f2 as Friends\lang1040\f1 \} \par with TInstantSelector.Create(nil) do \par try *************** *** 972,976 **** \par Open; \par for I := 0 to Pred(ObjectCount) do ! \par Result.AddColleague(Objects[I] as TPerson); \par finally \par Free; --- 972,976 ---- \par Open; \par for I := 0 to Pred(ObjectCount) do ! \par Result.AddFriend(Objects[I] as TPerson); \par finally \par Free; *************** *** 992,1001 **** \par end; \par ! \par procedure ShowColleagues(Person: TPerson); \par var \par I: Integer; \par begin ! \par for I := 0 to Pred(Person.ColleagueCount) do ! \par ShowMessage(Person.Colleagues[I].Caption); \par end; \par --- 992,1001 ---- \par end; \par ! \par procedure ShowFriends(Person: TPerson); \par var \par I: Integer; \par begin ! \par for I := 0 to Pred(Person.FriendCount) do ! \par ShowMessage(Person.Friends[I].Caption); \par end; \par *************** *** 1010,1014 **** \par try \par ShowPhones(Person); ! \par ShowColleagues(Person); \par finally \par Person.Free; --- 1010,1014 ---- \par try \par ShowPhones(Person); ! \par ShowFriends(Person); \par finally \par Person.Free; |
From: Steven M. <sr...@us...> - 2005-10-28 03:48:04
|
Update of /cvsroot/instantobjects/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23164 Modified Files: Readme.txt Added Files: Changes.txt Log Message: Separated out the version history from "Readme.txt" file to "Changes.txt" file. Index: Readme.txt =================================================================== RCS file: /cvsroot/instantobjects/Docs/Readme.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Readme.txt 27 Oct 2005 07:01:25 -0000 1.10 --- Readme.txt 28 Oct 2005 03:47:54 -0000 1.11 *************** *** 29,35 **** InstantObjects is an integrated framework for developing object-oriented business solutions in Borland Delphi(tm), Borland Kylix(tm) and soon also the open source ! FreePascal compiler. ! The framework provides the foundation for the development process as ! well as the engine that powers the final application. --- 29,34 ---- InstantObjects is an integrated framework for developing object-oriented business solutions in Borland Delphi(tm), Borland Kylix(tm) and soon also the open source ! FreePascal compiler. The framework provides the foundation for the development ! process as well as the engine that powers the final application. *************** *** 218,768 **** VERSION HISTORY --------------- ! ! Version 2.0 Beta 1 (1.9.1.1) (2005-10) ! ! - Several other bug fixes and small improvements. ! ! - Fixed a bug, which would cause memory leakage if the ! public method TInstantReferences.LoadObjectsFromStream ! was used. ! ! - Primer demo applications updated to reduce object memory ! leakage. ! ! - Added ReferencedBy counting and processing to resolve ! memory leaks caused by the reference counting semantics ! of InstantObjects in circular references. ! ! - Added enhanced Remember/Revert functionality for ! TInstantCustomExposer. Also includes Remember/Revert ! functionality for IO Memo attributes (assumes text only data). ! ! - Added ZeosDBO (ZeosLib project, see http://zeosforum.net.ms/) ! broker. ! ! - Changes for Kylix 3: Removed emf support under Linux and ! added catalogs. Removed unecessary files for PrimerK3. ! ! - The storage name of a references attribute is now stored ! into metadata, so when you reopen the class editor you ! haven't lost this information. ! ! - InternalRefreshObjects for TInstantNavigationalQuery and ! TInstantSQLQuery now uses a BusyObjects list with ownership ! reference added to InstantObjects. This ensures that the ! InstantObjects in the list are not destroyed prematurely ! causing AVs. ! ! - Object ownership behaviour of TInstantNavigationalResolver ! was made consistent with TInstantSQLResolver. Adding or ! inserting objects to an InstantSelector now behaves ! consistently for Navigational and SQL based brokers. ! ! - Fix bug in TInstantSQLResolver.ExecuteStatement that only ! indicated Info.Success as true if executed query returned ! one row. ! ! - Fix bug in TInstantNavigationalQuery.SetRowNumber so that ! loop iteration does not try to go past Dataset.Eof. ! ! - TInstantQuery.GetConnector now uses the global function ! InstantCheckConnector that will try to assign the ! DefaultConnector if one has not already been assigned. ! ! - Embedded and External Parts now behave similarly with respect ! to their contained InstantObjects (ie RefCounts and ! ownership). ! ! - Enhanced TInstantCodeAttribute.GetSingularName function. ! ! - TInstantObject.RestoreState now checks that the object is ! in the ObjectStore cache before trying to remove it. ! ! - Removed TInstantNavigationalQuery.TranslateCommand method ! (duplicated code). ! ! - Now using old DB builder for catalog-less brokers, and new one ! for the others. ! ! - Connection events don't work when database is not connected ! through TInstantConnector decendant. They have been removed. ! ! - Fix for bug # 1285523: Parts of Parts Are Lost when ! UpdateExternalPartsMap. When Model include a parts of parts ! schema, sometimes when store first level part the second ! level parts are lost in DataBase. ! ! - Allow for catalogs that don't support reading all metadata ! (like an XML catalog). ! ! ! Version 2.0 Alpha 1 (1.9.0.1) (2005-07) ! ! - Added UIB (Unified InterBase, see http://www.progdigy.com/modules.php?name=UIB) ! broker. ! ! - Added support for Delphi 2005 (D9), Win32 personality only. ! Brokers supported: ADO, BDE, DBX, IBX, NexusDbSQL, XML. ! ! - Removed UsePreparedQuery support; switch to the new StatementCache. ! ! - New TInstantConnector.OnGenerateId event, used to supply a custom ! Id generation strategy. Use it together with IdDataType/IdSize. ! ! - IdDataType and IdSize: see IdDataType_and_IdDataSize.txt. ! ! - Many fixes and improvenet to the new external storage mapping strategy. ! ! - StatementCache: see Statement_Cache.txt. ! ! - New performance tests (Retrieve and Statement Cache) in Primer. ! ! - A growing suite of unit tests (see the Tests folder). ! ! - TInstantPump: see InstantPump.txt. ! ! - Database structure evolution: ! see [RFC]_IO-001_Database_Structure_Evolution.txt ! until more complete docs are available. ! ! - Many bug fixes and small improvements. Please see our trackers: ! ! http://sourceforge.net/tracker/?group_id=94747&atid=608935 ! http://sourceforge.net/tracker/?group_id=94747&atid=608938 ! ! ! Version 1.6.7 (2004-11-17) UNOFFICIAL ! ! - Added support for IOMETADATA Keyword in metadata class definition and ! upgrade of ObjectFoundry for ModelMaker 7 & 8 support. ! Please refer to IOMETADATA_Keyword.txt for details. ! ! - ExternalPart, ExternalParts and ExternalReferences support. ! ! - Added InstantNexusSQL Broker ! ! - Changes to IBX Broker: ! - option to disable the use of delimited identifiers in dialect 3 databases ! - implemented InternalCreateDatabase and GetDatabaseExists ! ! - LoginPrompt support and OnLogin event in Connections based on TCustomConnection ! ! ! Version 1.6.6 (2004-07-29) UNOFFICIAL ! ! - Currency Support: ! Look into Primer Demo for a little explanation. ! ! - Graphic Support: ! Look into Primer Demo for a little explanation. ! ! - PrimerCross chaged for Currency and Graphic support ! ! - ConnectionManager changes: ! - ConnectionDefs moved from Form to ConnectionManager ! - ConnectByName method added in ConnectionManager to connect without showing form ! - atOpen option added in ConnectionManager to Open connections file (.con or .xml) ! ! - UsePreparedQuery support: ! Added UsePreparedQuery support for TInstantSQLBroker ! (more details in Preprared_Query_Support.txt). ! ! - Primer demo: PerformanceView form changed to make tests with UsePreparedQuery ! and other options ! ! - Added support for XML streaming in blob fields (Part, Parts, References) ! (more details in XML_Blob_Streaming_release_notes.txt) ! ! - Added OnAddClassFieldDef event and BreakThorough method to speed-up exposer's fieds creation. ! ! - Exposer's Undo method now is Virtual and UndoBuffer is available. ! ! ! Version 1.6.5 (2004-05-23) UNOFFICIAL ! ! - Kylix Porting (design, core and DbExpress broker). ! More details in Kylix3_porting_release_notes.txt. ! ! - Kylix porting of Primer Demo. ! ! - XML format for connection file managed by connectionmanager. ! ! ! Version 1.6 (2003-12-19) LAST COMMERCIAL VERSION ! ! - SQL based broker architecture introduced. ! ! - dbExpress broker added. (InterBase, MSSQL, DB2, Oracle, MySQL) ! ! - IBX broker now SQL based. ! ! - ADO/MSSQL broker now SQL based. ! ! - Object caching improved. ! ! - ObjectFoundry: Added attribute IsRequired awareness. ! ! - ObjectFoundry: Added attribute DefaultValue awareness. ! ! - ObjectFoundry: Fixed bug when applying attribute options and methods. ! ! - TInstantRelationalQuery.RecNoOfObject now returns correct record number when sequenced. ! ! - TInstantObject.AttributeAddress now protected and virtual. ! ! - Added keyword 'embedded' to non-stored classes with no attributes to improve ModelMaker support. ! ! - InstantRtti.AccessProperty; Fixed 'Invalid type' error on Boolean properties. ! ! - TInstantCustomExposer.LoadFieldValue; Fixed bug causing strings to be copied beyond buffer size. ! ! - TInstantCustomExposer: FieldDefs are now created from Fields to improve performance when using ! persistent fields. ! ! ! Version 1.5 (2003-02-25) ! ! - Added IProviderSupport to TInstantExposer and TInstantSelector. ! ! - Added Params to TInstantSelector and all brokers. ! ! - TInstantIQL; Added support for Params in; ":[ParamName]" format. ! ! - Added eoSyncEdit to TInstantExposerOptions to enable refreshing ! of current edit buffer when in edit mode and object changes elsewhere. ! ! - Added foRecurseNesting to TInstantFieldOptions to control recursive creation ! of nested DataSet fields. ! ! - Added option 'required' to attributes. ! ! - Added TInstantAttribute.IsRequired. ! ! - Added TInstantAttribute.IsMandatory. ! ! - TInstantObject; SaveState, ApplyState and RestoreState are now virtual. ! ! - TInstantIndexMetadata.Options changed to TIndexOptions to support additional ! options. ! ! - Added TInstantObjectNotifiers.AcceptItem. ! ! - Added TInstantRelationalQuery.CreateTranslator. ! ! - Added TInstantCustomExposer.ReleaseObject. ! ! - Added TInstantRelationalQuery.RecNoOfObject to support non-sequenced datasets ! in GotoObject/InternalIndexOfObject. ! ! - Added TInstantCustomExposer.RefreshCurrentObject. ! ! - Added ConvertToText and ConvertToBinary methods to allow XML streaming. ! ! - Changed streaming to allow XML streaming of foreign objects. ! ! - XML-processor now accepts blanks in stream. ! ! - Model can now be exported to XML via Model Explorer. ! ! - Fixed problem when loading class metadatas from DLL resource. ! ! - TInstantCustomExposer: Fixed bug causing metadata of inherited attributes ! to be ignored during field generation. ! ! - InstantCustomExposer.GotoObject now moves cursor to the specified ! object if it exists regardless whether it has been loaded or not. ! ! - TInstantCustomExposer.GotoObject: Fixed bug preventing object from being ! found when called immediately after opening dataset. ! ! - TInstantCustomExposer.ApplyChanges now calls PostChanges first to commit any ! pending changes. ! ! - TInstantSelector.RefreshData now refreshes objects from storage. ! ! - Fixed bugs in TInstantBlob causing content to be repeated or truncated. ! ! - TInstantRelationalTranslator.EmbraceString now uses LeftDelimiter and ! RightDelimiter. ! ! - Fixed refresh problem in exposers at design time when changing model via code. ! ! - Fixed various issues with TInstantExposer when used with DataSnap. ! ! - Added support for varOleStr, varNull and varEmpty to InstantCompareValues. ! ! - TInstantRelationalBroker; Fixed bug causing objects not to be refreshed if ! updates were performed by another session. ! ! - TInstantSelector; Fixed AV error that occured when the selector is loading ! and its associated connector is not yet loaded. ! ! - TInstantBlobStream.Create; No longer fails if attribute cannot be found. ! ! - InstantFindAttribute; Fixed attempt to traverse through unassigned object ! property. ! ! - Added ADS, DBISAM and FF brokers to Delphi 7 version. ! ! ! Version 1.3 (2002-09-12) ! ! - FlashFiler broker added. ! ! - DBISAM 3.16 supported. ! ! - TInstantConnector.Objects array added. ! ! - TInstantConnector.GenerateId added. ! ! - TInstantIBXBroker: Fixed duplicate index name error. ! ! - TInstantAttribute: GetValue/SetValue is now virtual. ! ! ! Version 1.22 (2002-07-30) - Delphi 7 Companion CD ! ! - Delphi 7 supported. ! ! - TInstantExposer: When exposing TCollection instances items are now created ! with TCollectionItem.Create to ensure proper initialization. ! ! - TInstantCustomExposer: Fixed access violation when deleting objects that are ! not TInstantObject instances. ! ! - Runtime package: Fixed bug hindering model from being loaded. ! ! - ADO broker: Added DB2 awareness. ! ! - TInstantDateTime: 'TIME' can now be used as default value for current time. ! ! - TInstantDateTime: Fixed convert error when setting default value. ! ! - TInstantObject: When refreshing object that was disposed by another session, ! the object is now marked as non-persistent and all attributes are reset. ! ! - TInstantCustomExposer: Added RemoveObject and DeleteObject. ! ! - TInstantObject: Added IsOperationAllowed and VerifyOperation. ! ! - Primer demo: Import/export of multiple objects added. ! ! ! Version 1.21 (2002-06-28) ! ! - InstantGetClass: Now returns nil instead of raising exception if class is ! not TInstantObject descendant. ! ! - Added InstantGetClasses to allow class enumeration. ! ! - Metadata: 'DATE' is now recognized as default value for DateTime attributes. ! ! - Fixed bug causing run-time model to be out of sync when removing or adding ! model units without changing code. ! ! - Exposer/Selector: Fixed bug causing data to be left in record buffer ! when adding a new row to an empty dataset and cancelling. ! ! - Exposer/Selector: Added Options property. Property AutoApply changed to ! eoAutoApply option. ! ! - Exposer/Selector: Added eoDeferInsert option to control whether objects are ! inserted immediately when inserting/appending new rows or when posting ! the row. ! ! - Exposer/Selector: Cursor no longer moves to first row when cancelling insert ! and Sorted is True. ! ! - BDE broker: Fixed bug in SQL translation for MS SQL Server via ODBC ! ! - BDE broker: Fixed bug in SQL translation for DB2 (ODBC and SQL Link) ! ! - DBISAM broker: Fixed bug causing remote databases being treated as local. ! ! - ObjectFoundry Expert: Fixed problem with classes not descending from ! TInstantObject being imported as embedded ! ! - ObjectFoundry Expert: Fixed error "Too many arguments in metadata" for ! long metadata sections. ! ! ! Version 1.2 (2002-05-16) ! ! - ObjectFoundry enabled. ! ! - DBISAM broker compiled with DBISAM 3.10. ! ! - Model Explorer now shows relations of non-stored classes in relation-view. ! ! - Fixed error causing Memo attributes to become String attributes when defined via ! the Attribute Editor. ! ! - Added virtual TInstantObject.GenerateId for generating custom Ids. ! ! - Added TInstantObject.Unchanged to allow ignoring changes. ! ! - Added TInstantReference.DestroyObject and TInstantReferences.DestroyObject to ! release object without clearing reference. ! ! - Added TInstantObject.OwnerChanged to notify when owner changes. ! ! - Fixed error when reading empty values from XML file. ! ! - Fixed stream position bug when streaming multiple objects from XML file. ! ! - Fixed bug causing objects read from stream to be only partly stored. ! ! - Added InstantReadObjects and InstantWriteObjects to read and write multiple objects ! from and to a stream. ! ! - BuildDatabase with IBX broker now fails on string fields without size. ! ! ! Version 1.11 (2002-04-22) ! ! - Fixed bug in exposer causing problems with lookup fields. ! ! - Fixed bug in TInstantObject causing IsPersistent to be True after Dispose. ! ! - Fixed bug in exposer causing CurrentObject to return wrong object when ! used with DevExpress QuantumGrid in standard grid mode. ! ! - Added TInstantConnector.UseTransactions to allow disabling transactions. ! ! - Added TInstantObjectNotifier.ObjectClass to allow filtering of notifications. ! ! - EAbort is no longer wrapped in EInstantError. ! ! - Fixed bug in TInstantObject.Refresh causing occasional blank values. ! ! - Fixed bug in DBISAM broker causing exception "Database name already exists". ! ! - TInstantConnectionBasedConnector introduced and used in BDE, ADO and IBX ! brokers. TInstantRelationalConnector no longer requires a TCustomConnection. ! ! - TInstantWriter.WriteString added to ensure stream compatibility between ! Delphi 5 and Delphi 6. ! ! - Added TInstantConnector.BuildDatabase that allows building tables for ! specified classes only. ! ! ! Version 1.1.0.1707 (2002-03-15) ! ! - DBISAM broker added. ! ! - Advantage Database Server broker added. ! ! - TInstantContainer.OnContentChanged replaced by OnBeforeContentChange and ! OnAfterContentChange. ! ! - IsDefault property for TInstantConnector changed to allow cross-project ! default connectors to exist in the same project group. ! ! - Fields for non-attribute object properties are now included in exposers ! and selectors at designtime. ! ! - Fixed memory leak when cancelling insert operations in selectors. ! ! - IBX resolver now converts booleans to and from smallints. ! ! - Enum properties are now handled correctly at designtime. ! ! - Exposers no longer clears new objects after they are constructed. ! ! - Fixed bug causing Connect/Disconnect button to disappear from Connection ! Manager after connecting. ! ! - Fixed bug in TInstantRelationalConnector causing "Unassigned connection" ! error when loading selector components associated with connectors without ! connections. ! ! - Fixed bug blocking delete operations on exposers when exposing instances of ! classes not descending from TInstantObject. ! ! ! Version 1.0.0.1706 (2002-02-14) ! ! - ADO, BDE and IBX brokers are now placed in individual packages. ! The complete source code for the brokers is installed into Source\Brokers ! along with a template broker package for creating custom brokers. ! The separate Broker Kit is no longer required. ! ! - The design-time database creation is now based on the Connection Manager. ! This allows you to define multiple connections for a project at design-time ! and (re)build each database from the IDE. Database creation can also be done ! for custom brokers at design-time when they have been installed into the IDE. ! ! - Database creation now creates fields from attribute storage names instead of ! attribute names. ! ! - Fixed bug causing AV when attempting to store an object via a connector with ! no connection. ! ! - Fixed bug causing AV when loading form with TInstantSelector that is linked ! to a TInstantIBXConnector with no connection. ! ! ! Version 1.0.0.1705 (2002-02-07) ! ! - InterBase dialect 3 is now supported. ! ! - Memos and Blobs larger than 255 bytes are now exposed correctly. ! ! - Picture attribute added to TPerson in Primer to demonstrate blob capabilities. ! ! - Parser error: "expected parameter" when using custom storage names for ! container attributes fixed. ! ! - Object changes made during store when an exposer is auto-applying are now ! reflected in the exposer. ! ! - Length of inherited string attributes is now correct when exposing objects of ! descendant classes. ! ! - Fixed design time Access Violation when removing connection component that ! is attached to a connector. ! ! - Visibility scope of some exposer/accessor methods have changed. ! ! - About box added to Model Explorer. ! ! ! Version 1.0.0.1704 (2002-01-23) ! ! - Exposer now refreshes record buffer when exposed objects are refreshed. ! ! - Fixed bug in TInstantSelector causing use of ancestor table name instead of ! own table name when specifying attributes introduced in ancestor that is not ! stored. ! ! - Fixed bug in TInstantObject.Retrieve causing stack problems when returning nil. ! ! ! Version 1.0.0.1703 (2002-01-03) ! ! - Fixed bug causing exposer/selector fields to be missing at design time. ! ! - Removed brackets from SQL when using MS SQL Server via ADO. ! ! - Fixed bug in InstantObjectBinaryToText when converting boolean values. ! ! ! Version 1.0.0.1702 (2001-12-23) ! ! - Fixed infinite loop when compiling immediately after changing model unit ! of large model on slow computers. ! ! - Fixed error "'0.0' is not a valid timestamp" when posting blank dates to ! exposers in Delphi 6. ! ! ! Version 1.0.0.1701 (2001-12-07) ! ! - Fixed bug in code generator causing delete of model unit source code ! when editing class via Model Explorer. ! ! ! Version 1.0.0.1659 (2001-12-03) ! ! - First public release. --- 217,219 ---- VERSION HISTORY --------------- ! Please see the "Changes.txt" file in the <installdir>/Docs folder. --- NEW FILE: Changes.txt --- VERSION HISTORY --------------- Version 2.0 Beta 1 (1.9.1.1) (2005-10) - Several other bug fixes and small improvements. - A growing suite of unit tests. Now over 300. (see the Tests folder). - Fixed a bug, which would cause memory leakage if the public method TInstantReferences.LoadObjectsFromStream was used. - Primer demo applications updated to reduce object memory leakage. - Added ReferencedBy counting and processing to resolve memory leaks caused by the reference counting semantics of InstantObjects in circular references. - Added enhanced Remember/Revert functionality for TInstantCustomExposer. Also includes Remember/Revert functionality for IO Memo attributes (assumes text only data). - Added ZeosDBO (ZeosLib project, see http://zeosforum.net.ms/) broker. - Changes for Kylix 3: Removed emf support under Linux and added catalogs. Removed unecessary files for PrimerK3. - The storage name of a references attribute is now stored into metadata, so when you reopen the class editor you haven't lost this information. - InternalRefreshObjects for TInstantNavigationalQuery and TInstantSQLQuery now uses a BusyObjects list with ownership reference added to InstantObjects. This ensures that the InstantObjects in the list are not destroyed prematurely causing AVs. - Object ownership behaviour of TInstantNavigationalResolver was made consistent with TInstantSQLResolver. Adding or inserting objects to an InstantSelector now behaves consistently for Navigational and SQL based brokers. - Fix bug in TInstantSQLResolver.ExecuteStatement that only indicated Info.Success as true if executed query returned one row. - Fix bug in TInstantNavigationalQuery.SetRowNumber so that loop iteration does not try to go past Dataset.Eof. - TInstantQuery.GetConnector now uses the global function InstantCheckConnector that will try to assign the DefaultConnector if one has not already been assigned. - Embedded and External Parts now behave similarly with respect to their contained InstantObjects (ie RefCounts and ownership). - Enhanced TInstantCodeAttribute.GetSingularName function. - TInstantObject.RestoreState now checks that the object is in the ObjectStore cache before trying to remove it. - Removed TInstantNavigationalQuery.TranslateCommand method (duplicated code). - Now using old DB builder for catalog-less brokers, and new one for the others. - Connection events don't work when database is not connected through TInstantConnector decendant. They have been removed. - Fix for bug # 1285523: Parts of Parts Are Lost when UpdateExternalPartsMap. When Model include a parts of parts schema, sometimes when store first level part the second level parts are lost in DataBase. - Allow for catalogs that don't support reading all metadata (like an XML catalog). Version 2.0 Alpha 1 (1.9.0.1) (2005-07) - Added UIB (Unified InterBase, see http://www.progdigy.com/modules.php?name=UIB) broker. - Added support for Delphi 2005 (D9), Win32 personality only. Brokers supported: ADO, BDE, DBX, IBX, NexusDbSQL, XML. - Removed UsePreparedQuery support; switch to the new StatementCache. - New TInstantConnector.OnGenerateId event, used to supply a custom Id generation strategy. Use it together with IdDataType/IdSize. - IdDataType and IdSize: see IdDataType_and_IdDataSize.txt. - Many fixes and improvenet to the new external storage mapping strategy. - StatementCache: see Statement_Cache.txt. - New performance tests (Retrieve and Statement Cache) in Primer. - A growing suite of unit tests (see the Tests folder). - TInstantPump: see InstantPump.txt. - Database structure evolution: see [RFC]_IO-001_Database_Structure_Evolution.txt until more complete docs are available. - Many bug fixes and small improvements. Please see our trackers: http://sourceforge.net/tracker/?group_id=94747&atid=608935 http://sourceforge.net/tracker/?group_id=94747&atid=608938 Version 1.6.7 (2004-11-17) UNOFFICIAL - Added support for IOMETADATA Keyword in metadata class definition and upgrade of ObjectFoundry for ModelMaker 7 & 8 support. Please refer to IOMETADATA_Keyword.txt for details. - ExternalPart, ExternalParts and ExternalReferences support. - Added InstantNexusSQL Broker - Changes to IBX Broker: - option to disable the use of delimited identifiers in dialect 3 databases - implemented InternalCreateDatabase and GetDatabaseExists - LoginPrompt support and OnLogin event in Connections based on TCustomConnection Version 1.6.6 (2004-07-29) UNOFFICIAL - Currency Support: Look into Primer Demo for a little explanation. - Graphic Support: Look into Primer Demo for a little explanation. - PrimerCross chaged for Currency and Graphic support - ConnectionManager changes: - ConnectionDefs moved from Form to ConnectionManager - ConnectByName method added in ConnectionManager to connect without showing form - atOpen option added in ConnectionManager to Open connections file (.con or .xml) - UsePreparedQuery support: Added UsePreparedQuery support for TInstantSQLBroker (more details in Preprared_Query_Support.txt). - Primer demo: PerformanceView form changed to make tests with UsePreparedQuery and other options - Added support for XML streaming in blob fields (Part, Parts, References) (more details in XML_Blob_Streaming_release_notes.txt) - Added OnAddClassFieldDef event and BreakThorough method to speed-up exposer's fieds creation. - Exposer's Undo method now is Virtual and UndoBuffer is available. Version 1.6.5 (2004-05-23) UNOFFICIAL - Kylix Porting (design, core and DbExpress broker). More details in Kylix3_porting_release_notes.txt. - Kylix porting of Primer Demo. - XML format for connection file managed by connectionmanager. Version 1.6 (2003-12-19) LAST COMMERCIAL VERSION - SQL based broker architecture introduced. - dbExpress broker added. (InterBase, MSSQL, DB2, Oracle, MySQL) - IBX broker now SQL based. - ADO/MSSQL broker now SQL based. - Object caching improved. - ObjectFoundry: Added attribute IsRequired awareness. - ObjectFoundry: Added attribute DefaultValue awareness. - ObjectFoundry: Fixed bug when applying attribute options and methods. - TInstantRelationalQuery.RecNoOfObject now returns correct record number when sequenced. - TInstantObject.AttributeAddress now protected and virtual. - Added keyword 'embedded' to non-stored classes with no attributes to improve ModelMaker support. - InstantRtti.AccessProperty; Fixed 'Invalid type' error on Boolean properties. - TInstantCustomExposer.LoadFieldValue; Fixed bug causing strings to be copied beyond buffer size. - TInstantCustomExposer: FieldDefs are now created from Fields to improve performance when using persistent fields. Version 1.5 (2003-02-25) - Added IProviderSupport to TInstantExposer and TInstantSelector. - Added Params to TInstantSelector and all brokers. - TInstantIQL; Added support for Params in; ":[ParamName]" format. - Added eoSyncEdit to TInstantExposerOptions to enable refreshing of current edit buffer when in edit mode and object changes elsewhere. - Added foRecurseNesting to TInstantFieldOptions to control recursive creation of nested DataSet fields. - Added option 'required' to attributes. - Added TInstantAttribute.IsRequired. - Added TInstantAttribute.IsMandatory. - TInstantObject; SaveState, ApplyState and RestoreState are now virtual. - TInstantIndexMetadata.Options changed to TIndexOptions to support additional options. - Added TInstantObjectNotifiers.AcceptItem. - Added TInstantRelationalQuery.CreateTranslator. - Added TInstantCustomExposer.ReleaseObject. - Added TInstantRelationalQuery.RecNoOfObject to support non-sequenced datasets in GotoObject/InternalIndexOfObject. - Added TInstantCustomExposer.RefreshCurrentObject. - Added ConvertToText and ConvertToBinary methods to allow XML streaming. - Changed streaming to allow XML streaming of foreign objects. - XML-processor now accepts blanks in stream. - Model can now be exported to XML via Model Explorer. - Fixed problem when loading class metadatas from DLL resource. - TInstantCustomExposer: Fixed bug causing metadata of inherited attributes to be ignored during field generation. - InstantCustomExposer.GotoObject now moves cursor to the specified object if it exists regardless whether it has been loaded or not. - TInstantCustomExposer.GotoObject: Fixed bug preventing object from being found when called immediately after opening dataset. - TInstantCustomExposer.ApplyChanges now calls PostChanges first to commit any pending changes. - TInstantSelector.RefreshData now refreshes objects from storage. - Fixed bugs in TInstantBlob causing content to be repeated or truncated. - TInstantRelationalTranslator.EmbraceString now uses LeftDelimiter and RightDelimiter. - Fixed refresh problem in exposers at design time when changing model via code. - Fixed various issues with TInstantExposer when used with DataSnap. - Added support for varOleStr, varNull and varEmpty to InstantCompareValues. - TInstantRelationalBroker; Fixed bug causing objects not to be refreshed if updates were performed by another session. - TInstantSelector; Fixed AV error that occured when the selector is loading and its associated connector is not yet loaded. - TInstantBlobStream.Create; No longer fails if attribute cannot be found. - InstantFindAttribute; Fixed attempt to traverse through unassigned object property. - Added ADS, DBISAM and FF brokers to Delphi 7 version. Version 1.3 (2002-09-12) - FlashFiler broker added. - DBISAM 3.16 supported. - TInstantConnector.Objects array added. - TInstantConnector.GenerateId added. - TInstantIBXBroker: Fixed duplicate index name error. - TInstantAttribute: GetValue/SetValue is now virtual. Version 1.22 (2002-07-30) - Delphi 7 Companion CD - Delphi 7 supported. - TInstantExposer: When exposing TCollection instances items are now created with TCollectionItem.Create to ensure proper initialization. - TInstantCustomExposer: Fixed access violation when deleting objects that are not TInstantObject instances. - Runtime package: Fixed bug hindering model from being loaded. - ADO broker: Added DB2 awareness. - TInstantDateTime: 'TIME' can now be used as default value for current time. - TInstantDateTime: Fixed convert error when setting default value. - TInstantObject: When refreshing object that was disposed by another session, the object is now marked as non-persistent and all attributes are reset. - TInstantCustomExposer: Added RemoveObject and DeleteObject. - TInstantObject: Added IsOperationAllowed and VerifyOperation. - Primer demo: Import/export of multiple objects added. Version 1.21 (2002-06-28) - InstantGetClass: Now returns nil instead of raising exception if class is not TInstantObject descendant. - Added InstantGetClasses to allow class enumeration. - Metadata: 'DATE' is now recognized as default value for DateTime attributes. - Fixed bug causing run-time model to be out of sync when removing or adding model units without changing code. - Exposer/Selector: Fixed bug causing data to be left in record buffer when adding a new row to an empty dataset and cancelling. - Exposer/Selector: Added Options property. Property AutoApply changed to eoAutoApply option. - Exposer/Selector: Added eoDeferInsert option to control whether objects are inserted immediately when inserting/appending new rows or when posting the row. - Exposer/Selector: Cursor no longer moves to first row when cancelling insert and Sorted is True. - BDE broker: Fixed bug in SQL translation for MS SQL Server via ODBC - BDE broker: Fixed bug in SQL translation for DB2 (ODBC and SQL Link) - DBISAM broker: Fixed bug causing remote databases being treated as local. - ObjectFoundry Expert: Fixed problem with classes not descending from TInstantObject being imported as embedded - ObjectFoundry Expert: Fixed error "Too many arguments in metadata" for long metadata sections. Version 1.2 (2002-05-16) - ObjectFoundry enabled. - DBISAM broker compiled with DBISAM 3.10. - Model Explorer now shows relations of non-stored classes in relation-view. - Fixed error causing Memo attributes to become String attributes when defined via the Attribute Editor. - Added virtual TInstantObject.GenerateId for generating custom Ids. - Added TInstantObject.Unchanged to allow ignoring changes. - Added TInstantReference.DestroyObject and TInstantReferences.DestroyObject to release object without clearing reference. - Added TInstantObject.OwnerChanged to notify when owner changes. - Fixed error when reading empty values from XML file. - Fixed stream position bug when streaming multiple objects from XML file. - Fixed bug causing objects read from stream to be only partly stored. - Added InstantReadObjects and InstantWriteObjects to read and write multiple objects from and to a stream. - BuildDatabase with IBX broker now fails on string fields without size. Version 1.11 (2002-04-22) - Fixed bug in exposer causing problems with lookup fields. - Fixed bug in TInstantObject causing IsPersistent to be True after Dispose. - Fixed bug in exposer causing CurrentObject to return wrong object when used with DevExpress QuantumGrid in standard grid mode. - Added TInstantConnector.UseTransactions to allow disabling transactions. - Added TInstantObjectNotifier.ObjectClass to allow filtering of notifications. - EAbort is no longer wrapped in EInstantError. - Fixed bug in TInstantObject.Refresh causing occasional blank values. - Fixed bug in DBISAM broker causing exception "Database name already exists". - TInstantConnectionBasedConnector introduced and used in BDE, ADO and IBX brokers. TInstantRelationalConnector no longer requires a TCustomConnection. - TInstantWriter.WriteString added to ensure stream compatibility between Delphi 5 and Delphi 6. - Added TInstantConnector.BuildDatabase that allows building tables for specified classes only. Version 1.1.0.1707 (2002-03-15) - DBISAM broker added. - Advantage Database Server broker added. - TInstantContainer.OnContentChanged replaced by OnBeforeContentChange and OnAfterContentChange. - IsDefault property for TInstantConnector changed to allow cross-project default connectors to exist in the same project group. - Fields for non-attribute object properties are now included in exposers and selectors at designtime. - Fixed memory leak when cancelling insert operations in selectors. - IBX resolver now converts booleans to and from smallints. - Enum properties are now handled correctly at designtime. - Exposers no longer clears new objects after they are constructed. - Fixed bug causing Connect/Disconnect button to disappear from Connection Manager after connecting. - Fixed bug in TInstantRelationalConnector causing "Unassigned connection" error when loading selector components associated with connectors without connections. - Fixed bug blocking delete operations on exposers when exposing instances of classes not descending from TInstantObject. Version 1.0.0.1706 (2002-02-14) - ADO, BDE and IBX brokers are now placed in individual packages. The complete source code for the brokers is installed into Source\Brokers along with a template broker package for creating custom brokers. The separate Broker Kit is no longer required. - The design-time database creation is now based on the Connection Manager. This allows you to define multiple connections for a project at design-time and (re)build each database from the IDE. Database creation can also be done for custom brokers at design-time when they have been installed into the IDE. - Database creation now creates fields from attribute storage names instead of attribute names. - Fixed bug causing AV when attempting to store an object via a connector with no connection. - Fixed bug causing AV when loading form with TInstantSelector that is linked to a TInstantIBXConnector with no connection. Version 1.0.0.1705 (2002-02-07) - InterBase dialect 3 is now supported. - Memos and Blobs larger than 255 bytes are now exposed correctly. - Picture attribute added to TPerson in Primer to demonstrate blob capabilities. - Parser error: "expected parameter" when using custom storage names for container attributes fixed. - Object changes made during store when an exposer is auto-applying are now reflected in the exposer. - Length of inherited string attributes is now correct when exposing objects of descendant classes. - Fixed design time Access Violation when removing connection component that is attached to a connector. - Visibility scope of some exposer/accessor methods have changed. - About box added to Model Explorer. Version 1.0.0.1704 (2002-01-23) - Exposer now refreshes record buffer when exposed objects are refreshed. - Fixed bug in TInstantSelector causing use of ancestor table name instead of own table name when specifying attributes introduced in ancestor that is not stored. - Fixed bug in TInstantObject.Retrieve causing stack problems when returning nil. Version 1.0.0.1703 (2002-01-03) - Fixed bug causing exposer/selector fields to be missing at design time. - Removed brackets from SQL when using MS SQL Server via ADO. - Fixed bug in InstantObjectBinaryToText when converting boolean values. Version 1.0.0.1702 (2001-12-23) - Fixed infinite loop when compiling immediately after changing model unit of large model on slow computers. - Fixed error "'0.0' is not a valid timestamp" when posting blank dates to exposers in Delphi 6. Version 1.0.0.1701 (2001-12-07) - Fixed bug in code generator causing delete of model unit source code when editing class via Model Explorer. Version 1.0.0.1659 (2001-12-03) - First public release. |
From: Steven M. <sr...@us...> - 2005-10-28 00:33:14
|
Update of /cvsroot/instantobjects/Source/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26273 Removed Files: TestInstantElement.pas Log Message: Remove redundant file TestInstantElement.pas' --- TestInstantElement.pas DELETED --- |
From: Carlo B. <car...@us...> - 2005-10-27 15:20:10
|
Update of /cvsroot/instantobjects/Source/Design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19136/Source/Design Modified Files: InstantAttributeEditor.dfm InstantAttributeEditor.pas Log Message: Fixed problem with AttributeEditor during editing of storagename. now the storagename is saved correctly if you press enter and you can reedit without losing focus. Index: InstantAttributeEditor.dfm =================================================================== RCS file: /cvsroot/instantobjects/Source/Design/InstantAttributeEditor.dfm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** InstantAttributeEditor.dfm 12 Oct 2005 16:28:42 -0000 1.13 --- InstantAttributeEditor.dfm 27 Oct 2005 15:19:58 -0000 1.14 *************** *** 124,128 **** DataSource = SubjectSource TabOrder = 4 ! OnExit = StorageNameEditExit end object SizeEdit: TDBEdit --- 124,128 ---- DataSource = SubjectSource TabOrder = 4 ! OnChange = StorageNameEditChange end object SizeEdit: TDBEdit Index: InstantAttributeEditor.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Design/InstantAttributeEditor.pas,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** InstantAttributeEditor.pas 17 Oct 2005 19:36:05 -0000 1.25 --- InstantAttributeEditor.pas 27 Oct 2005 15:19:58 -0000 1.26 *************** *** 113,117 **** procedure ExternalStorageNameEditChange(Sender: TObject); procedure AutoExternalStorageNameCheckBoxClick(Sender: TObject); ! procedure StorageNameEditExit(Sender: TObject); private FBaseClassStorageName: string; --- 113,117 ---- procedure ExternalStorageNameEditChange(Sender: TObject); procedure AutoExternalStorageNameCheckBoxClick(Sender: TObject); ! procedure StorageNameEditChange(Sender: TObject); private FBaseClassStorageName: string; *************** *** 495,501 **** for I := 0 to Pred(Parent.ControlCount) do begin - Parent.Controls[I].Enabled := not Disable; if Parent.Controls[I] is TWinControl then DisableSubControls(TWinControl(Parent.Controls[I]), Disable); end; end; --- 495,507 ---- for I := 0 to Pred(Parent.ControlCount) do begin if Parent.Controls[I] is TWinControl then + begin + //Disable control only if doesn't have focus + if not TWinControl(Parent.Controls[I]).Focused then + Parent.Controls[I].Enabled := not Disable; DisableSubControls(TWinControl(Parent.Controls[I]), Disable); + end + else + Parent.Controls[I].Enabled := not Disable; end; end; *************** *** 626,632 **** end; ! procedure TInstantAttributeEditorForm.StorageNameEditExit(Sender: TObject); begin inherited; UpdateControls; end; --- 632,640 ---- end; ! procedure TInstantAttributeEditorForm.StorageNameEditChange( ! Sender: TObject); begin inherited; + SubjectExposer.AssignFieldValue(StorageNameEdit.Field, StorageNameEdit.Text); UpdateControls; end; |
From: Carlo B. <car...@us...> - 2005-10-27 13:00:52
|
Update of /cvsroot/instantobjects/Source/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18528/Source/Tests Modified Files: TestInstantObject.pas TestInstantPart.pas TestInstantParts.pas TestModel.pas Log Message: Refactoring of Test classes: TPartExtenal --> TExternalAddress TPartsExternal --> TExternalPhones Also added line to set for test correctly assign method for External Part and Parts: vAttrMetadata.StorageKind := skExternal; Index: TestInstantParts.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Tests/TestInstantParts.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestInstantParts.pas 26 Oct 2005 09:20:24 -0000 1.2 --- TestInstantParts.pas 27 Oct 2005 13:00:41 -0000 1.3 *************** *** 124,130 **** FOwner := TContact.Create(FConn); ! FInstantParts := FOwner._ExternalParts; for i := 0 to 2 do ! FOwner.AddExternalPart(TPartsExternal.Create(FConn)); AssertEquals('Setup FInstantParts.Count', 3, FInstantParts.Count); end; --- 124,130 ---- FOwner := TContact.Create(FConn); ! FInstantParts := FOwner._ExternalPhones; for i := 0 to 2 do ! FOwner.AddExternalPart(TExternalPhones.Create(FConn)); AssertEquals('Setup FInstantParts.Count', 3, FInstantParts.Count); end; *************** *** 133,140 **** TInstantObject): Integer; var ! vObj1, vObj2: TPartsExternal; begin ! vObj1 := Obj1 as TPartsExternal; ! vObj2 := Obj2 as TPartsExternal; Result := AnsiCompareText(vObj1.Name, vObj2.Name); --- 133,140 ---- TInstantObject): Integer; var ! vObj1, vObj2: TExternalPhones; begin ! vObj1 := Obj1 as TExternalPhones; ! vObj2 := Obj2 as TExternalPhones; Result := AnsiCompareText(vObj1.Name, vObj2.Name); *************** *** 152,158 **** var vReturnValue: Integer; ! vExternalPart: TPartsExternal; begin ! vExternalPart := TPartsExternal.Create(FConn); vReturnValue := FInstantParts.Add(vExternalPart); AssertTrue(vReturnValue <> -1); --- 152,158 ---- var vReturnValue: Integer; ! vExternalPart: TExternalPhones; begin ! vExternalPart := TExternalPhones.Create(FConn); vReturnValue := FInstantParts.Add(vExternalPart); AssertTrue(vReturnValue <> -1); *************** *** 170,173 **** --- 170,174 ---- try vAttrMetadata.AttributeClass := TInstantParts; + vAttrMetadata.StorageKind := skExternal; vSource := TInstantParts.Create(FOwner, vAttrMetadata); *************** *** 185,191 **** var vReturnValue: Boolean; ! vExternalPart: TPartsExternal; begin ! vExternalPart := TPartsExternal.Create(FConn); vReturnValue := FInstantParts.AttachObject(vExternalPart); AssertTrue(vReturnValue); --- 186,192 ---- var vReturnValue: Boolean; ! vExternalPart: TExternalPhones; begin ! vExternalPart := TExternalPhones.Create(FConn); vReturnValue := FInstantParts.AttachObject(vExternalPart); AssertTrue(vReturnValue); *************** *** 224,234 **** procedure TestTInstantExtParts.TestExchange; begin ! TPartsExternal(FInstantParts.Items[0]).Name := 'Part0'; ! TPartsExternal(FInstantParts.Items[1]).Name := 'Part1'; ! TPartsExternal(FInstantParts.Items[2]).Name := 'Part2'; FInstantParts.Exchange(0, 2); ! AssertEquals('Part2', TPartsExternal(FInstantParts.Items[0]).Name); ! AssertEquals('Part1', TPartsExternal(FInstantParts.Items[1]).Name); ! AssertEquals('Part0', TPartsExternal(FInstantParts.Items[2]).Name); end; --- 225,235 ---- procedure TestTInstantExtParts.TestExchange; begin ! TExternalPhones(FInstantParts.Items[0]).Name := 'Part0'; ! TExternalPhones(FInstantParts.Items[1]).Name := 'Part1'; ! TExternalPhones(FInstantParts.Items[2]).Name := 'Part2'; FInstantParts.Exchange(0, 2); ! AssertEquals('Part2', TExternalPhones(FInstantParts.Items[0]).Name); ! AssertEquals('Part1', TExternalPhones(FInstantParts.Items[1]).Name); ! AssertEquals('Part0', TExternalPhones(FInstantParts.Items[2]).Name); end; *************** *** 250,254 **** vObject: TInstantObject; begin ! vObject := TPartsExternal.Create(FConn); FInstantParts.Insert(1, vObject); vReturnValue := FInstantParts.IndexOf(vObject); --- 251,255 ---- vObject: TInstantObject; begin ! vObject := TExternalPhones.Create(FConn); FInstantParts.Insert(1, vObject); vReturnValue := FInstantParts.IndexOf(vObject); *************** *** 261,265 **** vInstance: Pointer; begin ! vInstance := TPartsExternal.Create(FConn); FInstantParts.Insert(1, vInstance); vReturnValue := FInstantParts.IndexOfInstance(vInstance); --- 262,266 ---- vInstance: Pointer; begin ! vInstance := TExternalPhones.Create(FConn); FInstantParts.Insert(1, vInstance); vReturnValue := FInstantParts.IndexOfInstance(vInstance); *************** *** 269,285 **** procedure TestTInstantExtParts.TestMove; var ! vExternalPart: TPartsExternal; begin ! TPartsExternal(FInstantParts.Items[0]).Name := 'Part0'; ! TPartsExternal(FInstantParts.Items[1]).Name := 'Part1'; ! TPartsExternal(FInstantParts.Items[2]).Name := 'Part2'; ! vExternalPart := TPartsExternal.Create(FConn); FInstantParts.Add(vExternalPart); ! TPartsExternal(FInstantParts.Items[3]).Name := 'Part3'; FInstantParts.Move(0, 2); ! AssertEquals('Part1', TPartsExternal(FInstantParts.Items[0]).Name); ! AssertEquals('Part2', TPartsExternal(FInstantParts.Items[1]).Name); ! AssertEquals('Part0', TPartsExternal(FInstantParts.Items[2]).Name); ! AssertEquals('Part3', TPartsExternal(FInstantParts.Items[3]).Name); end; --- 270,286 ---- procedure TestTInstantExtParts.TestMove; var ! vExternalPart: TExternalPhones; begin ! TExternalPhones(FInstantParts.Items[0]).Name := 'Part0'; ! TExternalPhones(FInstantParts.Items[1]).Name := 'Part1'; ! TExternalPhones(FInstantParts.Items[2]).Name := 'Part2'; ! vExternalPart := TExternalPhones.Create(FConn); FInstantParts.Add(vExternalPart); ! TExternalPhones(FInstantParts.Items[3]).Name := 'Part3'; FInstantParts.Move(0, 2); ! AssertEquals('Part1', TExternalPhones(FInstantParts.Items[0]).Name); ! AssertEquals('Part2', TExternalPhones(FInstantParts.Items[1]).Name); ! AssertEquals('Part0', TExternalPhones(FInstantParts.Items[2]).Name); ! AssertEquals('Part3', TExternalPhones(FInstantParts.Items[3]).Name); end; *************** *** 321,338 **** procedure TestTInstantExtParts.TestSort; var ! vExternalPart: TPartsExternal; begin ! TPartsExternal(FInstantParts.Items[0]).Name := '2 Part'; ! TPartsExternal(FInstantParts.Items[1]).Name := '0 Part'; ! TPartsExternal(FInstantParts.Items[2]).Name := '1 Part'; ! vExternalPart := TPartsExternal.Create(FConn); FOwner.AddExternalPart(vExternalPart); ! TPartsExternal(FInstantParts.Items[3]).Name := '0 Part'; FInstantParts.Sort(PartsExternalCompare); ! AssertEquals('0 Part', TPartsExternal(FInstantParts.Items[0]).Name); ! AssertEquals('0 Part', TPartsExternal(FInstantParts.Items[1]).Name); ! AssertEquals('1 Part', TPartsExternal(FInstantParts.Items[2]).Name); ! AssertEquals('2 Part', TPartsExternal(FInstantParts.Items[3]).Name); end; --- 322,339 ---- procedure TestTInstantExtParts.TestSort; var ! vExternalPart: TExternalPhones; begin ! TExternalPhones(FInstantParts.Items[0]).Name := '2 Part'; ! TExternalPhones(FInstantParts.Items[1]).Name := '0 Part'; ! TExternalPhones(FInstantParts.Items[2]).Name := '1 Part'; ! vExternalPart := TExternalPhones.Create(FConn); FOwner.AddExternalPart(vExternalPart); ! TExternalPhones(FInstantParts.Items[3]).Name := '0 Part'; FInstantParts.Sort(PartsExternalCompare); ! AssertEquals('0 Part', TExternalPhones(FInstantParts.Items[0]).Name); ! AssertEquals('0 Part', TExternalPhones(FInstantParts.Items[1]).Name); ! AssertEquals('1 Part', TExternalPhones(FInstantParts.Items[2]).Name); ! AssertEquals('2 Part', TExternalPhones(FInstantParts.Items[3]).Name); end; *************** *** 345,349 **** AssertFalse(FInstantParts.IsChanged); ! TPartsExternal(FInstantParts.Items[1]).Name := 'Part2'; AssertTrue(FInstantParts.IsChanged); end; --- 346,350 ---- AssertFalse(FInstantParts.IsChanged); ! TExternalPhones(FInstantParts.Items[1]).Name := 'Part2'; AssertTrue(FInstantParts.IsChanged); end; *************** *** 577,581 **** AssertFalse(FInstantParts.IsChanged); ! TPartsExternal(FInstantParts.Items[1]).Name := 'Part2'; AssertTrue(FInstantParts.IsChanged); end; --- 578,582 ---- AssertFalse(FInstantParts.IsChanged); ! TExternalPhones(FInstantParts.Items[1]).Name := 'Part2'; AssertTrue(FInstantParts.IsChanged); end; *************** *** 626,634 **** var vReturnValue: Integer; ! vPart: TPartsExternal; begin ! FInstantParts := FOwner._ExternalParts; ! vPart := TPartsExternal.Create(FConn); AssertEquals(1, vPart.RefCount); --- 627,635 ---- var vReturnValue: Integer; ! vPart: TExternalPhones; begin ! FInstantParts := FOwner._ExternalPhones; ! vPart := TExternalPhones.Create(FConn); AssertEquals(1, vPart.RefCount); Index: TestInstantObject.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Tests/TestInstantObject.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestInstantObject.pas 18 Oct 2005 03:10:19 -0000 1.5 --- TestInstantObject.pas 27 Oct 2005 13:00:41 -0000 1.6 *************** *** 518,522 **** var vPhone: TPhone; ! vPartExternal: TPartExternal; vContact: TContact; vID, vID1: String; --- 518,522 ---- var vPhone: TPhone; ! vExternalAddress: TExternalAddress; vContact: TContact; vID, vID1: String; *************** *** 532,536 **** vContact := TContact.Create(FConn); ! vPartExternal := TPartExternal.Create(FConn); try FConn.StartTransaction; --- 532,536 ---- vContact := TContact.Create(FConn); ! vExternalAddress := TExternalAddress.Create(FConn); try FConn.StartTransaction; *************** *** 538,547 **** brok.MockManager.EndSetUp; vContact.Name := 'MyContact'; ! vPartExternal.Name := 'Part External'; ! AssertTrue(vPartExternal.IsChanged); ! vPartExternal.Store; ! vID1 := vPartExternal.Id; ! vContact.PartExternal := vPartExternal; ! AssertEquals('vPartExternal', 1, vPartExternal.RefCount); AssertEquals('vContact.Address', 1, vContact.Address.RefCount); --- 538,547 ---- brok.MockManager.EndSetUp; vContact.Name := 'MyContact'; ! vExternalAddress.Name := 'Part External'; ! AssertTrue(vExternalAddress.IsChanged); ! vExternalAddress.Store; ! vID1 := vExternalAddress.Id; ! vContact.ExternalAddress := vExternalAddress; ! AssertEquals('vExternalAddress', 1, vExternalAddress.RefCount); AssertEquals('vContact.Address', 1, vContact.Address.RefCount); *************** *** 559,565 **** AssertTrue('vContact.IsPersistent', vContact.IsPersistent); AssertFalse('vPhone.IsPersistent', vPhone.IsPersistent); ! AssertTrue('vPartExternal.IsPersistent', vPartExternal.IsPersistent); ! vPartExternal.Name := 'Changed'; ! AssertTrue(vPartExternal.IsChanged); AssertTrue(vContact.IsChanged); vID := vContact.Id; --- 559,565 ---- AssertTrue('vContact.IsPersistent', vContact.IsPersistent); AssertFalse('vPhone.IsPersistent', vPhone.IsPersistent); ! AssertTrue('vExternalAddress.IsPersistent', vExternalAddress.IsPersistent); ! vExternalAddress.Name := 'Changed'; ! AssertTrue(vExternalAddress.IsChanged); AssertTrue(vContact.IsChanged); vID := vContact.Id; Index: TestModel.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Tests/TestModel.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestModel.pas 26 Oct 2005 09:20:24 -0000 1.6 --- TestModel.pas 27 Oct 2005 13:00:41 -0000 1.7 *************** *** 44,49 **** TCountry = class; TEmail = class; ! TPartExternal = class; ! TPartsExternal = class; TPerson = class; TPhone = class; --- 44,49 ---- TCountry = class; TEmail = class; ! TExternalAddress = class; ! TExternalPhones = class; TPerson = class; TPhone = class; *************** *** 142,153 **** Phones: Parts(TPhone); Projects: References(TProject) external 'Contact_Projects'; ! PartExternal: Part(TPartExternal) external; ! ExternalParts: Parts(TPartsExternal) external 'Contact_ExternalParts'; } _Address: TInstantPart; _Category: TInstantReference; _City: TInstantString; ! _ExternalParts: TInstantParts; _Name: TInstantString; ! _PartExternal: TInstantPart; _Phones: TInstantParts; _Projects: TInstantReferences; --- 142,153 ---- Phones: Parts(TPhone); Projects: References(TProject) external 'Contact_Projects'; ! ExternalAddress: Part(TExternalAddress) external; ! ExternalPhones: Parts(TExternalPhones) external 'Contact_ExternalPhones'; } _Address: TInstantPart; _Category: TInstantReference; _City: TInstantString; ! _ExternalPhones: TInstantParts; _Name: TInstantString; ! _ExternalAddress: TInstantPart; _Phones: TInstantParts; _Projects: TInstantReferences; *************** *** 157,164 **** function GetCity: string; function GetExternalPartCount: Integer; ! function GetExternalParts(Index: Integer): TPartsExternal; function GetMainPhoneNumber: string; function GetName: string; ! function GetPartExternal: TPartExternal; function GetPhoneCount: Integer; function GetPhones(Index: Integer): TPhone; --- 157,164 ---- function GetCity: string; function GetExternalPartCount: Integer; ! function GetExternalPhones(Index: Integer): TExternalPhones; function GetMainPhoneNumber: string; function GetName: string; ! function GeTExternalAddress: TExternalAddress; function GetPhoneCount: Integer; function GetPhones(Index: Integer): TPhone; *************** *** 168,175 **** procedure SetCategory(Value: TCategory); procedure SetCity(const Value: string); ! procedure SetExternalParts(Index: Integer; Value: TPartsExternal); procedure SetMainPhoneNumber(const Value: string); procedure SetName(const Value: string); ! procedure SetPartExternal(Value: TPartExternal); procedure SetPhones(Index: Integer; Value: TPhone); procedure SetProjects(Index: Integer; Value: TProject); --- 168,175 ---- procedure SetCategory(Value: TCategory); procedure SetCity(const Value: string); ! procedure SetExternalPhones(Index: Integer; Value: TExternalPhones); procedure SetMainPhoneNumber(const Value: string); procedure SetName(const Value: string); ! procedure SeTExternalAddress(Value: TExternalAddress); procedure SetPhones(Index: Integer; Value: TPhone); procedure SetProjects(Index: Integer; Value: TProject); *************** *** 179,186 **** function GetCaption: string; override; public ! function AddExternalPart(ExternalPart: TPartsExternal): Integer; function AddPhone(Phone: TPhone): Integer; function AddProject(Project: TProject): Integer; ! procedure ClearExternalParts; procedure ClearPhones; procedure ClearProjects; --- 179,186 ---- function GetCaption: string; override; public ! function AddExternalPart(ExternalPart: TExternalPhones): Integer; function AddPhone(Phone: TPhone): Integer; function AddProject(Project: TProject): Integer; ! procedure ClearExternalPhones; procedure ClearPhones; procedure ClearProjects; *************** *** 188,202 **** procedure DeletePhone(Index: Integer); procedure DeleteProject(Index: Integer); ! function IndexOfExternalPart(ExternalPart: TPartsExternal): Integer; function IndexOfPhone(Phone: TPhone): Integer; function IndexOfProject(Project: TProject): Integer; ! procedure InsertExternalPart(Index: Integer; ExternalPart: TPartsExternal); procedure InsertPhone(Index: Integer; Phone: TPhone); procedure InsertProject(Index: Integer; Project: TProject); ! function RemoveExternalPart(ExternalPart: TPartsExternal): Integer; function RemovePhone(Phone: TPhone): Integer; function RemoveProject(Project: TProject): Integer; property ExternalPartCount: Integer read GetExternalPartCount; ! property ExternalParts[Index: Integer]: TPartsExternal read GetExternalParts write SetExternalParts; property PhoneCount: Integer read GetPhoneCount; property Phones[Index: Integer]: TPhone read GetPhones write SetPhones; --- 188,202 ---- procedure DeletePhone(Index: Integer); procedure DeleteProject(Index: Integer); ! function IndexOfExternalPart(ExternalPart: TExternalPhones): Integer; function IndexOfPhone(Phone: TPhone): Integer; function IndexOfProject(Project: TProject): Integer; ! procedure InsertExternalPart(Index: Integer; ExternalPart: TExternalPhones); procedure InsertPhone(Index: Integer; Phone: TPhone); procedure InsertProject(Index: Integer; Project: TProject); ! function RemoveExternalPart(ExternalPart: TExternalPhones): Integer; function RemovePhone(Phone: TPhone): Integer; function RemoveProject(Project: TProject): Integer; property ExternalPartCount: Integer read GetExternalPartCount; ! property ExternalPhones[Index: Integer]: TExternalPhones read GetExternalPhones write SetExternalPhones; property PhoneCount: Integer read GetPhoneCount; property Phones[Index: Integer]: TPhone read GetPhones write SetPhones; *************** *** 211,215 **** write SetMainPhoneNumber; property Name: string read GetName write SetName; ! property PartExternal: TPartExternal read GetPartExternal write SetPartExternal; end; --- 211,215 ---- write SetMainPhoneNumber; property Name: string read GetName write SetName; ! property ExternalAddress: TExternalAddress read GeTExternalAddress write SeTExternalAddress; end; *************** *** 315,319 **** end; ! TPartExternal = class(TInstantObject) {IOMETADATA stored; Name: String(30); --- 315,319 ---- end; ! TExternalAddress = class(TInstantObject) {IOMETADATA stored; Name: String(30); *************** *** 331,335 **** end; ! TPartsExternal = class(TInstantObject) {IOMETADATA stored; Name: String; } --- 331,335 ---- end; ! TExternalPhones = class(TInstantObject) {IOMETADATA stored; Name: String; } *************** *** 686,692 **** end; ! function TContact.AddExternalPart(ExternalPart: TPartsExternal): Integer; begin ! Result := _ExternalParts.Add(ExternalPart); end; --- 686,692 ---- end; ! function TContact.AddExternalPart(ExternalPart: TExternalPhones): Integer; begin ! Result := _ExternalPhones.Add(ExternalPart); end; *************** *** 716,722 **** end; ! procedure TContact.ClearExternalParts; begin ! _ExternalParts.Clear; end; --- 716,722 ---- end; ! procedure TContact.ClearExternalPhones; begin ! _ExternalPhones.Clear; end; *************** *** 733,737 **** procedure TContact.DeleteExternalPart(Index: Integer); begin ! _ExternalParts.Delete(Index); end; --- 733,737 ---- procedure TContact.DeleteExternalPart(Index: Integer); begin ! _ExternalPhones.Delete(Index); end; *************** *** 768,777 **** function TContact.GetExternalPartCount: Integer; begin ! Result := _ExternalParts.Count; end; ! function TContact.GetExternalParts(Index: Integer): TPartsExternal; begin ! Result := _ExternalParts[Index] as TPartsExternal; end; --- 768,777 ---- function TContact.GetExternalPartCount: Integer; begin ! Result := _ExternalPhones.Count; end; ! function TContact.GetExternalPhones(Index: Integer): TExternalPhones; begin ! Result := _ExternalPhones[Index] as TExternalPhones; end; *************** *** 789,795 **** end; ! function TContact.GetPartExternal: TPartExternal; begin ! Result := _PartExternal.Value as TPartExternal; end; --- 789,795 ---- end; ! function TContact.GeTExternalAddress: TExternalAddress; begin ! Result := _ExternalAddress.Value as TExternalAddress; end; *************** *** 814,820 **** end; ! function TContact.IndexOfExternalPart(ExternalPart: TPartsExternal): Integer; begin ! Result := _ExternalParts.IndexOf(ExternalPart); end; --- 814,820 ---- end; ! function TContact.IndexOfExternalPart(ExternalPart: TExternalPhones): Integer; begin ! Result := _ExternalPhones.IndexOf(ExternalPart); end; *************** *** 829,835 **** end; ! procedure TContact.InsertExternalPart(Index: Integer; ExternalPart: TPartsExternal); begin ! _ExternalParts.Insert(Index, ExternalPart); end; --- 829,835 ---- end; ! procedure TContact.InsertExternalPart(Index: Integer; ExternalPart: TExternalPhones); begin ! _ExternalPhones.Insert(Index, ExternalPart); end; *************** *** 844,850 **** end; ! function TContact.RemoveExternalPart(ExternalPart: TPartsExternal): Integer; begin ! Result := _ExternalParts.Remove(ExternalPart); end; --- 844,850 ---- end; ! function TContact.RemoveExternalPart(ExternalPart: TExternalPhones): Integer; begin ! Result := _ExternalPhones.Remove(ExternalPart); end; *************** *** 874,880 **** end; ! procedure TContact.SetExternalParts(Index: Integer; Value: TPartsExternal); begin ! _ExternalParts[Index] := Value; end; --- 874,880 ---- end; ! procedure TContact.SetExternalPhones(Index: Integer; Value: TExternalPhones); begin ! _ExternalPhones[Index] := Value; end; *************** *** 901,907 **** end; ! procedure TContact.SetPartExternal(Value: TPartExternal); begin ! _PartExternal.Value := Value; end; --- 901,907 ---- end; ! procedure TContact.SeTExternalAddress(Value: TExternalAddress); begin ! _ExternalAddress.Value := Value; end; *************** *** 1000,1033 **** end; ! { TPartExternal } ! function TPartExternal.GetCategory: TCategory; begin Result := _Category.Value as TCategory; end; ! function TPartExternal.GetName: string; begin Result := _Name.Value; end; ! procedure TPartExternal.SetCategory(Value: TCategory); begin _Category.Value := Value; end; ! procedure TPartExternal.SetName(const Value: string); begin _Name.Value := Value; end; ! { TPartsExternal } ! function TPartsExternal.GetName: string; begin Result := _Name.Value; end; ! procedure TPartsExternal.SetName(const Value: string); begin _Name.Value := Value; --- 1000,1033 ---- end; ! { TExternalAddress } ! function TExternalAddress.GetCategory: TCategory; begin Result := _Category.Value as TCategory; end; ! function TExternalAddress.GetName: string; begin Result := _Name.Value; end; ! procedure TExternalAddress.SetCategory(Value: TCategory); begin _Category.Value := Value; end; ! procedure TExternalAddress.SetName(const Value: string); begin _Name.Value := Value; end; ! { TExternalPhones } ! function TExternalPhones.GetName: string; begin Result := _Name.Value; end; ! procedure TExternalPhones.SetName(const Value: string); begin _Name.Value := Value; *************** *** 1043,1048 **** TCountry, TEmail, ! TPartExternal, ! TPartsExternal, TPerson, TPhone, --- 1043,1048 ---- TCountry, TEmail, ! TExternalAddress, ! TExternalPhones, TPerson, TPhone, Index: TestInstantPart.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Tests/TestInstantPart.pas,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestInstantPart.pas 26 Oct 2005 09:20:24 -0000 1.7 --- TestInstantPart.pas 27 Oct 2005 13:00:41 -0000 1.8 *************** *** 271,275 **** FOwner := TContact.Create(FConn); ! FInstantPart := FOwner._PartExternal; end; --- 271,275 ---- FOwner := TContact.Create(FConn); ! FInstantPart := FOwner._ExternalAddress; end; *************** *** 291,295 **** vSource: TInstantPart; vAttrMetadata: TInstantAttributeMetadata; ! vPart: TPartExternal; vCategory: TCategory; begin --- 291,295 ---- vSource: TInstantPart; vAttrMetadata: TInstantAttributeMetadata; ! vPart: TExternalAddress; vCategory: TCategory; begin *************** *** 299,304 **** try vAttrMetadata.AttributeClass := TInstantPart; vSource := TInstantPart.Create(FOwner, vAttrMetadata); ! vPart := TPartExternal.Create(FConn); FInstantPart.Value := vPart; AssertTrue('Value HasVal', FInstantPart.HasValue); --- 299,305 ---- try vAttrMetadata.AttributeClass := TInstantPart; + vAttrMetadata.StorageKind := skExternal; vSource := TInstantPart.Create(FOwner, vAttrMetadata); ! vPart := TExternalAddress.Create(FConn); FInstantPart.Value := vPart; AssertTrue('Value HasVal', FInstantPart.HasValue); *************** *** 309,317 **** vCategory := TCategory.Create(FConn); try ! TPartExternal(FInstantPart.Value).Category := vCategory; finally vCategory.Free; end; ! AssertEquals(1, TPartExternal(FInstantPart.Value).Category.RefCount); AssertFalse('vSource HasVal', vSource.HasValue); --- 310,318 ---- vCategory := TCategory.Create(FConn); try ! TExternalAddress(FInstantPart.Value).Category := vCategory; finally vCategory.Free; end; ! AssertEquals(1, TExternalAddress(FInstantPart.Value).Category.RefCount); AssertFalse('vSource HasVal', vSource.HasValue); *************** *** 320,325 **** AssertTrue('vSource HasVal', vSource.HasValue); AssertNotSame(FInstantPart.Value, vSource.Value); ! AssertSame(TPartExternal(FInstantPart.Value).Category, ! TPartExternal(vSource.Value).Category); finally vSource.Free; --- 321,326 ---- AssertTrue('vSource HasVal', vSource.HasValue); AssertNotSame(FInstantPart.Value, vSource.Value); ! AssertSame(TExternalAddress(FInstantPart.Value).Category, ! TExternalAddress(vSource.Value).Category); finally vSource.Free; *************** *** 331,337 **** var vReturnValue: Boolean; ! vObject: TPartExternal; begin ! vObject := TPartExternal.Create(FConn); vObject.Id := 'Object.Id'; AssertEquals('Object RefCount 1', 1, vObject.RefCount); --- 332,338 ---- var vReturnValue: Boolean; ! vObject: TExternalAddress; begin ! vObject := TExternalAddress.Create(FConn); vObject.Id := 'Object.Id'; AssertEquals('Object RefCount 1', 1, vObject.RefCount); *************** *** 354,358 **** AssertFalse(FInstantPart.HasValue); ! FInstantPart.Value := TPartExternal.Create(FConn); AssertTrue(FInstantPart.HasValue); end; --- 355,359 ---- AssertFalse(FInstantPart.HasValue); ! FInstantPart.Value := TExternalAddress.Create(FConn); AssertTrue(FInstantPart.HasValue); end; *************** *** 360,368 **** procedure TestTInstantExtPart.TestIsChanged; var ! vPart: TPartExternal; begin AssertFalse(FInstantPart.IsChanged); ! vPart := TPartExternal.Create(FConn); vPart.Changed; FInstantPart.Value := vPart; --- 361,369 ---- procedure TestTInstantExtPart.TestIsChanged; var ! vPart: TExternalAddress; begin AssertFalse(FInstantPart.IsChanged); ! vPart := TExternalAddress.Create(FConn); vPart.Changed; FInstantPart.Value := vPart; *************** *** 372,380 **** procedure TestTInstantExtPart.TestIsDefault; var ! vPart: TPartExternal; begin AssertTrue(FInstantPart.IsDefault); ! vPart := TPartExternal.Create(FConn); vPart.Id := 'PartId'; FInstantPart.Value := vPart; --- 373,381 ---- procedure TestTInstantExtPart.TestIsDefault; var ! vPart: TExternalAddress; begin AssertTrue(FInstantPart.IsDefault); ! vPart := TExternalAddress.Create(FConn); vPart.Id := 'PartId'; FInstantPart.Value := vPart; *************** *** 384,392 **** procedure TestTInstantExtPart.TestSaveObjectTo_FromStream; var ! vObject: TPartExternal; vReturnValue: Boolean; vStream: TStream; begin ! vObject := TPartExternal.Create(FConn); AssertNotNull('Create object', vObject); AssertEquals('Object RefCount 1', 1, vObject.RefCount); --- 385,393 ---- procedure TestTInstantExtPart.TestSaveObjectTo_FromStream; var ! vObject: TExternalAddress; vReturnValue: Boolean; vStream: TStream; begin ! vObject := TExternalAddress.Create(FConn); AssertNotNull('Create object', vObject); AssertEquals('Object RefCount 1', 1, vObject.RefCount); *************** *** 430,434 **** vFirstObj := FInstantPart.Value; ! vSecondObj := TPartExternal.Create(FConn); vSecondObj.Id := 'PartId'; FInstantPart.Value := vSecondObj; --- 431,435 ---- vFirstObj := FInstantPart.Value; ! vSecondObj := TExternalAddress.Create(FConn); vSecondObj.Id := 'PartId'; FInstantPart.Value := vSecondObj; |
From: Carlo B. <car...@us...> - 2005-10-27 12:52:20
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16760/Source/Core Modified Files: InstantPersistence.pas Log Message: Fixed a bug assigning Parts External (the fixes was made by Nando) Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** InstantPersistence.pas 26 Oct 2005 09:13:15 -0000 1.69 --- InstantPersistence.pas 27 Oct 2005 12:52:01 -0000 1.70 *************** *** 6678,6726 **** begin Clear; ! // if not external then clone and add then object ! if Metadata.StorageKind = skEmbedded then ! begin ! with TInstantParts(Source) do ! for I := 0 to Pred(Count) do ! begin ! Obj := Items[I].Clone(Self.Connector); ! try ! Self.Add(Obj); ! except ! Obj.Free; ! raise; ! end; ! end; ! end ! else begin ! if TInstantParts(Source).Metadata.StorageKind = skEmbedded then ! begin ! // if it's not external then clone and add the object ! with TInstantParts(Source) do ! for I := 0 to Pred(Count) do ! begin ! Obj := Items[I].Clone(Self.Connector); ! try ! Self.Add(Obj); ! except ! Obj.Free; ! raise; ! end; ! end; ! end ! else begin ! // if source is external clone only if connector is different ! with TInstantParts(Source) do ! begin ! for I := 0 to Pred(Count) do ! begin ! if Connector <> Self.Connector then ! Self.Add(Items[I].Clone(Self.Connector)) ! else ! Self.Add(Items[I]); ! end; ! end end; end; --- 6678,6692 ---- begin Clear; ! with TInstantParts(Source) do begin ! for I := 0 to Pred(Count) do begin ! Obj := Items[I].Clone(Self.Connector); ! try ! Self.Add(Obj); ! except ! Obj.Free; ! raise; ! end; end; end; |
From: Steven M. <sr...@us...> - 2005-10-27 07:01:36
|
Update of /cvsroot/instantobjects/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10573 Modified Files: Readme.txt Log Message: Added more to version history. Index: Readme.txt =================================================================== RCS file: /cvsroot/instantobjects/Docs/Readme.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Readme.txt 21 Oct 2005 16:52:42 -0000 1.9 --- Readme.txt 27 Oct 2005 07:01:25 -0000 1.10 *************** *** 221,227 **** --- 221,299 ---- Version 2.0 Beta 1 (1.9.1.1) (2005-10) + - Several other bug fixes and small improvements. + + - Fixed a bug, which would cause memory leakage if the + public method TInstantReferences.LoadObjectsFromStream + was used. + + - Primer demo applications updated to reduce object memory + leakage. + + - Added ReferencedBy counting and processing to resolve + memory leaks caused by the reference counting semantics + of InstantObjects in circular references. + + - Added enhanced Remember/Revert functionality for + TInstantCustomExposer. Also includes Remember/Revert + functionality for IO Memo attributes (assumes text only data). + - Added ZeosDBO (ZeosLib project, see http://zeosforum.net.ms/) broker. + - Changes for Kylix 3: Removed emf support under Linux and + added catalogs. Removed unecessary files for PrimerK3. + + - The storage name of a references attribute is now stored + into metadata, so when you reopen the class editor you + haven't lost this information. + + - InternalRefreshObjects for TInstantNavigationalQuery and + TInstantSQLQuery now uses a BusyObjects list with ownership + reference added to InstantObjects. This ensures that the + InstantObjects in the list are not destroyed prematurely + causing AVs. + + - Object ownership behaviour of TInstantNavigationalResolver + was made consistent with TInstantSQLResolver. Adding or + inserting objects to an InstantSelector now behaves + consistently for Navigational and SQL based brokers. + + - Fix bug in TInstantSQLResolver.ExecuteStatement that only + indicated Info.Success as true if executed query returned + one row. + + - Fix bug in TInstantNavigationalQuery.SetRowNumber so that + loop iteration does not try to go past Dataset.Eof. + + - TInstantQuery.GetConnector now uses the global function + InstantCheckConnector that will try to assign the + DefaultConnector if one has not already been assigned. + + - Embedded and External Parts now behave similarly with respect + to their contained InstantObjects (ie RefCounts and + ownership). + + - Enhanced TInstantCodeAttribute.GetSingularName function. + + - TInstantObject.RestoreState now checks that the object is + in the ObjectStore cache before trying to remove it. + + - Removed TInstantNavigationalQuery.TranslateCommand method + (duplicated code). + + - Now using old DB builder for catalog-less brokers, and new one + for the others. + + - Connection events don't work when database is not connected + through TInstantConnector decendant. They have been removed. + + - Fix for bug # 1285523: Parts of Parts Are Lost when + UpdateExternalPartsMap. When Model include a parts of parts + schema, sometimes when store first level part the second + level parts are lost in DataBase. + + - Allow for catalogs that don't support reading all metadata + (like an XML catalog). + Version 2.0 Alpha 1 (1.9.0.1) (2005-07) |
From: Steven M. <sr...@us...> - 2005-10-26 22:42:47
|
Update of /cvsroot/instantobjects/Source/Install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21933 Modified Files: HowToInstall.txt Log Message: Minor changes for grammer, spelling and readability. Index: HowToInstall.txt =================================================================== RCS file: /cvsroot/instantobjects/Source/Install/HowToInstall.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HowToInstall.txt 26 Oct 2005 08:02:21 -0000 1.1 --- HowToInstall.txt 26 Oct 2005 22:42:40 -0000 1.2 *************** *** 1,9 **** INSTALLING INSTANTOBJECTS USING BORLAND PROGRAM GROUPS ------------------------------------------------------ ! This tutorial is for newbie developers that want install InstantObjects in a simple way. If you want a complete explanation of InstantObjects structure, please refer to the installation section of \Doc\Readme.txt file. ! If you want a rapid installation process to evaluate InstantObjects, you can use the two "standard" bpg projects contained into Specific Delphi Folder under this Install folder. For every Delphi version you can find: --- 1,11 ---- INSTALLING INSTANTOBJECTS USING BORLAND PROGRAM GROUPS ------------------------------------------------------ ! 27 October 2005 - Carlo Barazzetta ! ! This tutorial is for newbie developers that want to install InstantObjects in a simple way. If you want a complete explanation of InstantObjects structure, please refer to the installation section of \Doc\Readme.txt file. ! If you want a quick installation process to evaluate InstantObjects, you can use the two "standard" bpg projects in the folder for your Delphi/Kylix version under this Install folder. For every Delphi version you can find: *************** *** 12,18 **** - DesignTimePackages.bpg to Build/Install all of the "standard" design-time packages. ! - Open it and the first time "Install" every single packages included. ! "Standard" packages means that you can compile it with components included in a standard Delphi istallation. If you want to know how install other brokers to use third party data access components and technologies, please refer to the installation section of \Doc\Readme.txt file. RunTimePackages.bpg contains: --- 14,20 ---- - DesignTimePackages.bpg to Build/Install all of the "standard" design-time packages. ! - Open it and "Install" each package included. ! "Standard" packages means that you can compile it with components included in a standard Delphi installation. If you want to know how to install other brokers to use third party data access components and technologies, please refer to the installation section of \Doc\Readme.txt file. RunTimePackages.bpg contains: *************** *** 34,36 **** 6) dclIOXML.dpk : XML Broker ! When you are familiar with the packages and source structure of InstantObjects you can maintain your personal bpg files to include only packages you want use. --- 36,39 ---- 6) dclIOXML.dpk : XML Broker ! When you are familiar with the packages and source structure of InstantObjects you can setup and maintain your own personalised bpg files to include only packages you want use. ! |