From: <na...@us...> - 2009-08-05 10:57:20
|
Revision: 813 http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=813&view=rev Author: nandod Date: 2009-08-05 10:57:00 +0000 (Wed, 05 Aug 2009) Log Message: ----------- * Unicode support in XML broker and other XML-related areas rewritten. Demos and Tests updated accordingly. + As a bonus, XML broker now supports ORDER BY in IQL queries. * Removed useless code from InstantADO that was causing problems in D2009. Modified Paths: -------------- trunk/Demos/Intro/Intro.mdr trunk/Demos/Intro/Intro_D2009.dproj trunk/Demos/PrimerCross/Main.dfm trunk/Demos/PrimerCross/Main.pas trunk/Demos/PrimerCross/Primer.dproj trunk/Demos/PrimerCross/PrimerExternal.xml trunk/Source/Brokers/ADO/InstantADO.pas trunk/Source/Brokers/XML/InstantXML.pas trunk/Source/Core/InstantClasses.pas trunk/Source/Core/InstantConsts.pas trunk/Source/Core/InstantPersistence.pas trunk/Source/Core/InstantUtils.pas trunk/Source/Design/D2007/DclIOCore.dpk trunk/Source/Design/D2007/DclIOCore.dproj trunk/Source/Design/D7/DclIOCore.dpk trunk/Source/Design/InstantAbout.pas trunk/Source/PackageGroups/D2007/DesignTimePackages.groupproj trunk/Tests/TestIO.dpr trunk/Tests/TestIO.dproj trunk/Tests/TestIO.mdr trunk/Tests/TestIO.mdrt trunk/Tests/TestIO.mdx trunk/Tests/TestIO.mdxt trunk/Tests/TestIO_D2009.dproj Added Paths: ----------- trunk/Demos/Intro/Intro_D2009.dpr trunk/Demos/PrimerCross/Primer_D2009.dpr trunk/Demos/PrimerCross/Primer_D2009.dproj trunk/Demos/PrimerCross/Primer_D2009.mdr trunk/Demos/PrimerCross/Primer_D2009.res trunk/Demos/PrimerCross/Primer_D2009.xml trunk/Source/PackageGroups/D2009/DesignTimePackages.groupproj trunk/Source/PackageGroups/D2009/RunTimePackages.groupproj trunk/Tests/TestIO_D2009.dpr trunk/Tests/TestIO_D2009.mdrt trunk/Tests/TestIO_D2009.mdx trunk/Tests/TestIO_D2009.mdxt trunk/Tests/TestIO_D2009.res trunk/Tests/TestXMLBroker.pas Removed Paths: ------------- trunk/Tests/TestIO_D2007.dproj trunk/Tests/TestIO_D2007.mdr Property Changed: ---------------- trunk/Demos/PrimerCross/ trunk/Tests/ Modified: trunk/Demos/Intro/Intro.mdr =================================================================== (Binary files differ) Added: trunk/Demos/Intro/Intro_D2009.dpr =================================================================== --- trunk/Demos/Intro/Intro_D2009.dpr (rev 0) +++ trunk/Demos/Intro/Intro_D2009.dpr 2009-08-05 10:57:00 UTC (rev 813) @@ -0,0 +1,21 @@ +program Intro_D2009; + +uses + Forms, + Model in 'Model.pas', + Main in 'Main.pas' {MainForm}, + ContactEdit in 'ContactEdit.pas' {ContactEditForm}, + PersonEdit in 'PersonEdit.pas' {PersonEditForm}, + CompanyEdit in 'CompanyEdit.pas' {CompanyEditForm}; + +{$R *.RES} +{$R *.MDR} {Model} + +begin + Application.Initialize; + Application.CreateForm(TMainForm, MainForm); + Application.CreateForm(TContactEditForm, ContactEditForm); + Application.CreateForm(TPersonEditForm, PersonEditForm); + Application.CreateForm(TCompanyEditForm, CompanyEditForm); + Application.Run; +end. Property changes on: trunk/Demos/Intro/Intro_D2009.dpr ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: trunk/Demos/Intro/Intro_D2009.dproj =================================================================== --- trunk/Demos/Intro/Intro_D2009.dproj 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Demos/Intro/Intro_D2009.dproj 2009-08-05 10:57:00 UTC (rev 813) @@ -1,7 +1,7 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectGuid>{5e7fed32-48a7-4d66-a1ed-fbf2fb9c43c1}</ProjectGuid> - <MainSource>Intro.dpr</MainSource> + <MainSource>Intro_D2009.dpr</MainSource> <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> @@ -24,7 +24,7 @@ </PropertyGroup> <PropertyGroup Condition="'$(Base)'!=''"> <DCC_UsePackage>vclx;vcl;dbrtl;Rave76VCL;bdertl;rtl;vclactnband;vcldb;vcldbx;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;xmlrtl;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;websnap;webdsnap;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DataSnapServer;DbxClientDriver;DBXInterBaseDriver;DBXMySQLDriver;dbxcds;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;IWEliteSuite_100_Delphi2009;InstantBDExpress;IOCore;IOBDE</DCC_UsePackage> - <DCC_DependencyCheckOutputName>Intro.exe</DCC_DependencyCheckOutputName> + <DCC_DependencyCheckOutputName>Intro_D2009.exe</DCC_DependencyCheckOutputName> </PropertyGroup> <PropertyGroup Condition="'$(Cfg_1)'!=''"> <Version>7.0</Version> @@ -97,7 +97,7 @@ <VersionInfoKeys Name="Comments"/> </VersionInfoKeys> <Source> - <Source Name="MainSource">Intro.dpr</Source> + <Source Name="MainSource">Intro_D2009.dpr</Source> </Source> <Excluded_Packages> <Excluded_Packages Name="$(BDS)\bin\dcloffice2k120.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages> @@ -108,7 +108,7 @@ <ProjectFileVersion>12</ProjectFileVersion> </ProjectExtensions> <ItemGroup> - <DelphiCompile Include="Intro.dpr"> + <DelphiCompile Include="Intro_D2009.dpr"> <MainSource>MainSource</MainSource> </DelphiCompile> <DCCReference Include="Model.pas"/> Property changes on: trunk/Demos/PrimerCross ___________________________________________________________________ Modified: svn:ignore - *.dcu *.~* *.ddp *.exe __history *.identcache *.local *.dsk *.MB + *.dcu *.~* *.ddp *.exe __history *.identcache *.local *.dsk *.MB XMLDB Modified: trunk/Demos/PrimerCross/Main.dfm =================================================================== --- trunk/Demos/PrimerCross/Main.dfm 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Demos/PrimerCross/Main.dfm 2009-08-05 10:57:00 UTC (rev 813) @@ -1,8 +1,6 @@ object MainForm: TMainForm Left = 254 Top = 225 - Width = 521 - Height = 372 Caption = 'InstantObjects Primer' Color = clBtnFace Font.Charset = DEFAULT_CHARSET @@ -12,25 +10,24 @@ Font.Style = [] Menu = MainMenu OldCreateOrder = False - WindowState = wsMaximized OnClose = FormClose OnCreate = FormCreate + OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object SideBarSplitter: TSplitter Left = 88 - Top = 28 - Height = 271 + Top = 26 + Height = 458 ResizeStyle = rsLine end object ToolBar: TToolBar Left = 0 Top = 0 - Width = 513 - Height = 28 + Width = 624 + Height = 26 AutoSize = True BorderWidth = 1 - Flat = True Images = ActionImages ParentShowHint = False ShowHint = True @@ -48,8 +45,8 @@ end object StatusBar: TStatusBar Left = 0 - Top = 299 - Width = 513 + Top = 484 + Width = 624 Height = 19 Panels = < item @@ -62,9 +59,9 @@ end object SideBarPanel: TPanel Left = 0 - Top = 28 + Top = 26 Width = 88 - Height = 271 + Height = 458 Align = alLeft BevelOuter = bvNone BorderStyle = bsSingle @@ -82,7 +79,7 @@ Left = 0 Top = 8 Width = 84 - Height = 259 + Height = 446 Align = alClient BorderStyle = bsNone Color = clAppWorkSpace @@ -100,16 +97,16 @@ end object WorkPanel: TPanel Left = 91 - Top = 28 - Width = 422 - Height = 271 + Top = 26 + Width = 533 + Height = 458 Align = alClient BevelOuter = bvNone TabOrder = 3 object WorkTitleSpacer: TBevel Left = 0 Top = 27 - Width = 422 + Width = 533 Height = 4 Align = alTop Shape = bsSpacer @@ -117,7 +114,7 @@ object WorkTitlePanel: TPanel Left = 0 Top = 0 - Width = 422 + Width = 533 Height = 27 Align = alTop BevelInner = bvLowered @@ -140,8 +137,8 @@ object WorkClientPanel: TPanel Left = 0 Top = 31 - Width = 422 - Height = 240 + Width = 533 + Height = 427 Align = alClient BevelOuter = bvNone TabOrder = 1 Modified: trunk/Demos/PrimerCross/Main.pas =================================================================== --- trunk/Demos/PrimerCross/Main.pas 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Demos/PrimerCross/Main.pas 2009-08-05 10:57:00 UTC (rev 813) @@ -75,6 +75,7 @@ procedure ExportItemClick(Sender: TObject); procedure ImportItemClick(Sender: TObject); procedure ExportModelItemClick(Sender: TObject); + procedure FormShow(Sender: TObject); private FActiveSubView: TBasicViewForm; FConnectionDef: TInstantConnectionDef; @@ -541,6 +542,11 @@ UpdateStatus; end; +procedure TMainForm.FormShow(Sender: TObject); +begin + WindowState := wsMaximized; +end; + function TMainForm.GetConnectionName: string; begin if Assigned(FConnectionDef) then Modified: trunk/Demos/PrimerCross/Primer.dproj =================================================================== --- trunk/Demos/PrimerCross/Primer.dproj 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Demos/PrimerCross/Primer.dproj 2009-08-05 10:57:00 UTC (rev 813) @@ -1,117 +1,183 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <ProjectGuid>{d197a2d4-31b9-43b1-8070-3f804d86e53f}</ProjectGuid> - <MainSource>Primer.dpr</MainSource> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> - <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <Version>7.0</Version> - <DCC_DebugInformation>False</DCC_DebugInformation> - <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> - <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> - <DCC_Define>RELEASE</DCC_Define> - <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_UnitSearchPath> - <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ResourcePath> - <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ObjPath> - <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_IncludePath> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <Version>7.0</Version> - <DCC_Define>DEBUG;IO_STATEMENT_LOGGING</DCC_Define> - <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_UnitSearchPath> - <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ResourcePath> - <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ObjPath> - <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_IncludePath> - </PropertyGroup> - <ProjectExtensions> - <Borland.Personality>Delphi.Personality</Borland.Personality> - <Borland.ProjectType>VCLApplication</Borland.ProjectType> - <BorlandProject> -<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1030</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">InstantObjects.org</VersionInfoKeys><VersionInfoKeys Name="FileDescription">Primer Demo</VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">MPL public license</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">Primer.dpr</Source></Source></Delphi.Personality> <ModelSupport>False</ModelSupport> -</BorlandProject></BorlandProject> - </ProjectExtensions> - <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" /> - <ItemGroup> - <DelphiCompile Include="Primer.dpr"> - <MainSource>MainSource</MainSource> - </DelphiCompile> - <DCCReference Include="BasicBrowse.pas"> - <Form>BasicBrowseForm</Form> - </DCCReference> - <DCCReference Include="BasicEdit.pas"> - <Form>BasicEditForm</Form> - </DCCReference> - <DCCReference Include="BasicView.pas"> - <Form>BasicViewForm</Form> - <DesignClass>TFrame</DesignClass> - </DCCReference> - <DCCReference Include="CategoryBrowse.pas"> - <Form>CategoryBrowseForm</Form> - </DCCReference> - <DCCReference Include="CompanyBrowse.pas"> - <Form>CompanyBrowseForm</Form> - </DCCReference> - <DCCReference Include="CompanyEdit.pas"> - <Form>CompanyEditForm</Form> - </DCCReference> - <DCCReference Include="ContactBrowse.pas"> - <Form>ContactBrowseForm</Form> - </DCCReference> - <DCCReference Include="ContactEdit.pas"> - <Form>ContactEditForm</Form> - </DCCReference> - <DCCReference Include="ContactFilterEdit.pas"> - <Form>ContactFilterEditForm</Form> - </DCCReference> - <DCCReference Include="ContactSort.pas"> - <Form>ContactSortForm</Form> - </DCCReference> - <DCCReference Include="ContactView.pas"> - <Form>ContactViewForm</Form> - <DesignClass>TFrame</DesignClass> - </DCCReference> - <DCCReference Include="CountryBrowse.pas"> - <Form>CountryBrowseForm</Form> - </DCCReference> - <DCCReference Include="DemoData.pas" /> - <DCCReference Include="DemoDataRequest.pas"> - <Form>DemoDataRequestForm</Form> - </DCCReference> - <DCCReference Include="HelpView.pas"> - <Form>HelpViewForm</Form> - <DesignClass>TFrame</DesignClass> - </DCCReference> - <DCCReference Include="Main.pas"> - <Form>MainForm</Form> - </DCCReference> - <DCCReference Include="MainData.pas"> - <Form>MainDataModule</Form> - <DesignClass>TDataModule</DesignClass> - </DCCReference> - <DCCReference Include="Model\Model.pas" /> - <DCCReference Include="PerformanceView.pas"> - <Form>PerformanceViewForm</Form> - <DesignClass>TFrame</DesignClass> - </DCCReference> - <DCCReference Include="PersonBrowse.pas"> - <Form>PersonBrowseForm</Form> - </DCCReference> - <DCCReference Include="PersonEdit.pas"> - <Form>PersonEditForm</Form> - </DCCReference> - <DCCReference Include="QueryView.pas"> - <Form>QueryViewForm</Form> - <DesignClass>TFrame</DesignClass> - </DCCReference> - <DCCReference Include="RandomData.pas" /> - <DCCReference Include="Stopwatch.pas" /> - <DCCReference Include="Utility.pas" /> - <DCCReference Include="Welcome.pas"> - <Form>WelcomeForm</Form> - </DCCReference> - </ItemGroup> -</Project> \ No newline at end of file + <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectGuid>{d197a2d4-31b9-43b1-8070-3f804d86e53f}</ProjectGuid> + <MainSource>Primer.dpr</MainSource> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> + <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName> + <ProjectVersion>12.0</ProjectVersion> + <Config Condition="'$(Config)'==''">Debug</Config> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> + <Cfg_1>true</Cfg_1> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''"> + <Cfg_2>true</Cfg_2> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Base)'!=''"> + <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_1)'!=''"> + <Version>7.0</Version> + <DCC_DebugInformation>False</DCC_DebugInformation> + <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> + <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> + <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> + <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> + <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ResourcePath)</DCC_ResourcePath> + <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ObjPath)</DCC_ObjPath> + <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_IncludePath)</DCC_IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_2)'!=''"> + <Version>7.0</Version> + <DCC_Define>DEBUG;IO_STATEMENT_LOGGING;$(DCC_Define)</DCC_Define> + <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> + <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ResourcePath)</DCC_ResourcePath> + <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ObjPath)</DCC_ObjPath> + <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_IncludePath)</DCC_IncludePath> + </PropertyGroup> + <ProjectExtensions> + <Borland.Personality>Delphi.Personality.12</Borland.Personality> + <Borland.ProjectType>VCLApplication</Borland.ProjectType> + <BorlandProject> + <Delphi.Personality> + <Parameters> + <Parameters Name="UseLauncher">False</Parameters> + <Parameters Name="LoadAllSymbols">True</Parameters> + <Parameters Name="LoadUnspecifiedSymbols">False</Parameters> + </Parameters> + <VersionInfo> + <VersionInfo Name="IncludeVerInfo">True</VersionInfo> + <VersionInfo Name="AutoIncBuild">False</VersionInfo> + <VersionInfo Name="MajorVer">2</VersionInfo> + <VersionInfo Name="MinorVer">0</VersionInfo> + <VersionInfo Name="Release">0</VersionInfo> + <VersionInfo Name="Build">0</VersionInfo> + <VersionInfo Name="Debug">False</VersionInfo> + <VersionInfo Name="PreRelease">False</VersionInfo> + <VersionInfo Name="Special">False</VersionInfo> + <VersionInfo Name="Private">False</VersionInfo> + <VersionInfo Name="DLL">False</VersionInfo> + <VersionInfo Name="Locale">1030</VersionInfo> + <VersionInfo Name="CodePage">1252</VersionInfo> + </VersionInfo> + <VersionInfoKeys> + <VersionInfoKeys Name="CompanyName">InstantObjects.org</VersionInfoKeys> + <VersionInfoKeys Name="FileDescription">Primer Demo</VersionInfoKeys> + <VersionInfoKeys Name="FileVersion">2.0.0.0</VersionInfoKeys> + <VersionInfoKeys Name="InternalName"/> + <VersionInfoKeys Name="LegalCopyright">MPL public license</VersionInfoKeys> + <VersionInfoKeys Name="LegalTrademarks"/> + <VersionInfoKeys Name="OriginalFilename"/> + <VersionInfoKeys Name="ProductName"/> + <VersionInfoKeys Name="ProductVersion">2.0</VersionInfoKeys> + <VersionInfoKeys Name="Comments"/> + </VersionInfoKeys> + <Source> + <Source Name="MainSource">Primer.dpr</Source> + </Source> + </Delphi.Personality> + <ModelSupport>False</ModelSupport> + </BorlandProject> + <ProjectFileVersion>12</ProjectFileVersion> + </ProjectExtensions> + <ItemGroup> + <DelphiCompile Include="Primer.dpr"> + <MainSource>MainSource</MainSource> + </DelphiCompile> + <DCCReference Include="Main.pas"> + <Form>MainForm</Form> + </DCCReference> + <DCCReference Include="Model\Model.pas"/> + <DCCReference Include="ContactView.pas"> + <Form>ContactViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="BasicView.pas"> + <Form>BasicViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="BasicEdit.pas"> + <Form>BasicEditForm</Form> + </DCCReference> + <DCCReference Include="ContactEdit.pas"> + <Form>ContactEditForm</Form> + </DCCReference> + <DCCReference Include="PersonEdit.pas"> + <Form>PersonEditForm</Form> + </DCCReference> + <DCCReference Include="CompanyEdit.pas"> + <Form>CompanyEditForm</Form> + </DCCReference> + <DCCReference Include="DemoData.pas"/> + <DCCReference Include="ContactFilterEdit.pas"> + <Form>ContactFilterEditForm</Form> + </DCCReference> + <DCCReference Include="MainData.pas"> + <Form>MainDataModule</Form> + <DesignClass>TDataModule</DesignClass> + </DCCReference> + <DCCReference Include="ContactBrowse.pas"> + <Form>ContactBrowseForm</Form> + </DCCReference> + <DCCReference Include="CompanyBrowse.pas"> + <Form>CompanyBrowseForm</Form> + </DCCReference> + <DCCReference Include="PerformanceView.pas"> + <Form>PerformanceViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="Welcome.pas"> + <Form>WelcomeForm</Form> + </DCCReference> + <DCCReference Include="PersonBrowse.pas"> + <Form>PersonBrowseForm</Form> + </DCCReference> + <DCCReference Include="BasicBrowse.pas"> + <Form>BasicBrowseForm</Form> + </DCCReference> + <DCCReference Include="CountryBrowse.pas"> + <Form>CountryBrowseForm</Form> + </DCCReference> + <DCCReference Include="DemoDataRequest.pas"> + <Form>DemoDataRequestForm</Form> + </DCCReference> + <DCCReference Include="ContactSort.pas"> + <Form>ContactSortForm</Form> + </DCCReference> + <DCCReference Include="CategoryBrowse.pas"> + <Form>CategoryBrowseForm</Form> + </DCCReference> + <DCCReference Include="HelpView.pas"> + <Form>HelpViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="QueryView.pas"> + <Form>QueryViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="RandomData.pas"/> + <DCCReference Include="Stopwatch.pas"/> + <DCCReference Include="Utility.pas"/> + <BuildConfiguration Include="Base"> + <Key>Base</Key> + </BuildConfiguration> + <BuildConfiguration Include="Debug"> + <Key>Cfg_2</Key> + <CfgParent>Base</CfgParent> + </BuildConfiguration> + <BuildConfiguration Include="Release"> + <Key>Cfg_1</Key> + <CfgParent>Base</CfgParent> + </BuildConfiguration> + </ItemGroup> + <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> + </Project> Modified: trunk/Demos/PrimerCross/PrimerExternal.xml =================================================================== --- trunk/Demos/PrimerCross/PrimerExternal.xml 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Demos/PrimerCross/PrimerExternal.xml 2009-08-05 10:57:00 UTC (rev 813) @@ -1,11 +1,2 @@ -<TInstantConnectionDefs> - <TInstantIBXConnectionDef> - <Name>FirebirdDBExternal</Name> - <IsBuilt>TRUE</IsBuilt> - <LoginPrompt>FALSE</LoginPrompt> - <ConnectionString>.\FirebirdDB\PRIMERDB.FDB</ConnectionString> - <Options>ibxUseDelimitedIdents</Options> - <Params>User_Name=SYSDBA -Password=masterkey</Params> - </TInstantIBXConnectionDef> -</TInstantConnectionDefs> \ No newline at end of file +<TInstantConnectionDefs><TInstantIBXConnectionDef><Name>FirebirdDBExternal</Name><IsBuilt>TRUE</IsBuilt><LoginPrompt>FALSE</LoginPrompt><ConnectionString>.\FirebirdDB\PRIMERDB.FDB</ConnectionString><Options>ibxUseDelimitedIdents</Options><Params>User_Name=SYSDBA +Password=masterkey</Params></TInstantIBXConnectionDef><TInstantXMLConnectionDef><Name>XMLDB</Name><IsBuilt>TRUE</IsBuilt><RootFolder>W:\Projects\instantobjects\Demos\PrimerCross\XMLDB</RootFolder></TInstantXMLConnectionDef></TInstantConnectionDefs> \ No newline at end of file Added: trunk/Demos/PrimerCross/Primer_D2009.dpr =================================================================== --- trunk/Demos/PrimerCross/Primer_D2009.dpr (rev 0) +++ trunk/Demos/PrimerCross/Primer_D2009.dpr 2009-08-05 10:57:00 UTC (rev 813) @@ -0,0 +1,80 @@ +(* + * InstantObjects + * Primer Demo - with "internal storage" of Part and Parts + * Model.pas unit is located in Model folder + * + *) + +(* ***** 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 Original Code is: Seleqt InstantObjects + * + * The Initial Developer of the Original Code is: Seleqt + * + * Portions created by the Initial Developer are Copyright (C) 2001-2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Carlo Barazzetta, Nando Dessena + * + * ***** END LICENSE BLOCK ***** *) + +program Primer_D2009; + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + + +uses + Forms, + Main in 'Main.pas' {MainForm}, + Model in 'Model\Model.pas', + ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, + BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, + BasicEdit in 'BasicEdit.pas' {BasicEditForm}, + ContactEdit in 'ContactEdit.pas' {ContactEditForm}, + PersonEdit in 'PersonEdit.pas' {PersonEditForm}, + CompanyEdit in 'CompanyEdit.pas' {CompanyEditForm}, + DemoData in 'DemoData.pas', + ContactFilterEdit in 'ContactFilterEdit.pas' {ContactFilterEditForm}, + MainData in 'MainData.pas' {MainDataModule: TDataModule}, + ContactBrowse in 'ContactBrowse.pas' {ContactBrowseForm}, + CompanyBrowse in 'CompanyBrowse.pas' {CompanyBrowseForm}, + PerformanceView in 'PerformanceView.pas' {PerformanceViewForm: TFrame}, + Welcome in 'Welcome.pas' {WelcomeForm}, + PersonBrowse in 'PersonBrowse.pas' {PersonBrowseForm}, + BasicBrowse in 'BasicBrowse.pas' {BasicBrowseForm}, + CountryBrowse in 'CountryBrowse.pas' {CountryBrowseForm}, + DemoDataRequest in 'DemoDataRequest.pas' {DemoDataRequestForm}, + ContactSort in 'ContactSort.pas' {ContactSortForm}, + CategoryBrowse in 'CategoryBrowse.pas' {CategoryBrowseForm}, + HelpView in 'HelpView.pas' {HelpViewForm: TFrame}, + QueryView in 'QueryView.pas' {QueryViewForm: TFrame}, + RandomData in 'RandomData.pas', + Stopwatch in 'Stopwatch.pas', + Utility in 'Utility.pas'; + +{$R *.res} +{$R *.mdr} {Model} + +begin + Application.Initialize; + Application.Title := 'InstantObjects Primer Demo (Delphi 2009 version)'; + Application.CreateForm(TMainForm, MainForm); + Application.CreateForm(TMainDataModule, MainDataModule); + Application.Run; +end. Property changes on: trunk/Demos/PrimerCross/Primer_D2009.dpr ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/Demos/PrimerCross/Primer_D2009.dproj =================================================================== --- trunk/Demos/PrimerCross/Primer_D2009.dproj (rev 0) +++ trunk/Demos/PrimerCross/Primer_D2009.dproj 2009-08-05 10:57:00 UTC (rev 813) @@ -0,0 +1,184 @@ + <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectGuid>{d197a2d4-31b9-43b1-8070-3f804d86e53f}</ProjectGuid> + <MainSource>Primer_D2009.dpr</MainSource> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> + <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName> + <ProjectVersion>12.0</ProjectVersion> + <Config Condition="'$(Config)'==''">Debug</Config> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> + <Cfg_1>true</Cfg_1> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''"> + <Cfg_2>true</Cfg_2> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Base)'!=''"> + <DCC_DependencyCheckOutputName>Primer_D2009.exe</DCC_DependencyCheckOutputName> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_1)'!=''"> + <Version>7.0</Version> + <DCC_DebugInformation>False</DCC_DebugInformation> + <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> + <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> + <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> + <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> + <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ResourcePath)</DCC_ResourcePath> + <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ObjPath)</DCC_ObjPath> + <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_IncludePath)</DCC_IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_2)'!=''"> + <DCC_DebugDCUs>true</DCC_DebugDCUs> + <Version>7.0</Version> + <DCC_Define>DEBUG;IO_STATEMENT_LOGGING;$(DCC_Define)</DCC_Define> + <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> + <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ResourcePath)</DCC_ResourcePath> + <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ObjPath)</DCC_ObjPath> + <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_IncludePath)</DCC_IncludePath> + </PropertyGroup> + <ProjectExtensions> + <Borland.Personality>Delphi.Personality.12</Borland.Personality> + <Borland.ProjectType>VCLApplication</Borland.ProjectType> + <BorlandProject> + <Delphi.Personality> + <Parameters> + <Parameters Name="UseLauncher">False</Parameters> + <Parameters Name="LoadAllSymbols">True</Parameters> + <Parameters Name="LoadUnspecifiedSymbols">False</Parameters> + </Parameters> + <VersionInfo> + <VersionInfo Name="IncludeVerInfo">True</VersionInfo> + <VersionInfo Name="AutoIncBuild">False</VersionInfo> + <VersionInfo Name="MajorVer">2</VersionInfo> + <VersionInfo Name="MinorVer">0</VersionInfo> + <VersionInfo Name="Release">0</VersionInfo> + <VersionInfo Name="Build">0</VersionInfo> + <VersionInfo Name="Debug">False</VersionInfo> + <VersionInfo Name="PreRelease">False</VersionInfo> + <VersionInfo Name="Special">False</VersionInfo> + <VersionInfo Name="Private">False</VersionInfo> + <VersionInfo Name="DLL">False</VersionInfo> + <VersionInfo Name="Locale">1030</VersionInfo> + <VersionInfo Name="CodePage">1252</VersionInfo> + </VersionInfo> + <VersionInfoKeys> + <VersionInfoKeys Name="CompanyName">InstantObjects.org</VersionInfoKeys> + <VersionInfoKeys Name="FileDescription">Primer Demo</VersionInfoKeys> + <VersionInfoKeys Name="FileVersion">2.0.0.0</VersionInfoKeys> + <VersionInfoKeys Name="InternalName"/> + <VersionInfoKeys Name="LegalCopyright">MPL public license</VersionInfoKeys> + <VersionInfoKeys Name="LegalTrademarks"/> + <VersionInfoKeys Name="OriginalFilename"/> + <VersionInfoKeys Name="ProductName"/> + <VersionInfoKeys Name="ProductVersion">2.0</VersionInfoKeys> + <VersionInfoKeys Name="Comments"/> + </VersionInfoKeys> + <Source> + <Source Name="MainSource">Primer_D2009.dpr</Source> + </Source> + </Delphi.Personality> + <ModelSupport>False</ModelSupport> + </BorlandProject> + <ProjectFileVersion>12</ProjectFileVersion> + </ProjectExtensions> + <ItemGroup> + <DelphiCompile Include="Primer_D2009.dpr"> + <MainSource>MainSource</MainSource> + </DelphiCompile> + <DCCReference Include="Main.pas"> + <Form>MainForm</Form> + </DCCReference> + <DCCReference Include="Model\Model.pas"/> + <DCCReference Include="ContactView.pas"> + <Form>ContactViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="BasicView.pas"> + <Form>BasicViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="BasicEdit.pas"> + <Form>BasicEditForm</Form> + </DCCReference> + <DCCReference Include="ContactEdit.pas"> + <Form>ContactEditForm</Form> + </DCCReference> + <DCCReference Include="PersonEdit.pas"> + <Form>PersonEditForm</Form> + </DCCReference> + <DCCReference Include="CompanyEdit.pas"> + <Form>CompanyEditForm</Form> + </DCCReference> + <DCCReference Include="DemoData.pas"/> + <DCCReference Include="ContactFilterEdit.pas"> + <Form>ContactFilterEditForm</Form> + </DCCReference> + <DCCReference Include="MainData.pas"> + <Form>MainDataModule</Form> + <DesignClass>TDataModule</DesignClass> + </DCCReference> + <DCCReference Include="ContactBrowse.pas"> + <Form>ContactBrowseForm</Form> + </DCCReference> + <DCCReference Include="CompanyBrowse.pas"> + <Form>CompanyBrowseForm</Form> + </DCCReference> + <DCCReference Include="PerformanceView.pas"> + <Form>PerformanceViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="Welcome.pas"> + <Form>WelcomeForm</Form> + </DCCReference> + <DCCReference Include="PersonBrowse.pas"> + <Form>PersonBrowseForm</Form> + </DCCReference> + <DCCReference Include="BasicBrowse.pas"> + <Form>BasicBrowseForm</Form> + </DCCReference> + <DCCReference Include="CountryBrowse.pas"> + <Form>CountryBrowseForm</Form> + </DCCReference> + <DCCReference Include="DemoDataRequest.pas"> + <Form>DemoDataRequestForm</Form> + </DCCReference> + <DCCReference Include="ContactSort.pas"> + <Form>ContactSortForm</Form> + </DCCReference> + <DCCReference Include="CategoryBrowse.pas"> + <Form>CategoryBrowseForm</Form> + </DCCReference> + <DCCReference Include="HelpView.pas"> + <Form>HelpViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="QueryView.pas"> + <Form>QueryViewForm</Form> + <DesignClass>TFrame</DesignClass> + </DCCReference> + <DCCReference Include="RandomData.pas"/> + <DCCReference Include="Stopwatch.pas"/> + <DCCReference Include="Utility.pas"/> + <BuildConfiguration Include="Base"> + <Key>Base</Key> + </BuildConfiguration> + <BuildConfiguration Include="Debug"> + <Key>Cfg_2</Key> + <CfgParent>Base</CfgParent> + </BuildConfiguration> + <BuildConfiguration Include="Release"> + <Key>Cfg_1</Key> + <CfgParent>Base</CfgParent> + </BuildConfiguration> + </ItemGroup> + <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> + </Project> Property changes on: trunk/Demos/PrimerCross/Primer_D2009.dproj ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/Demos/PrimerCross/Primer_D2009.mdr =================================================================== (Binary files differ) Property changes on: trunk/Demos/PrimerCross/Primer_D2009.mdr ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Demos/PrimerCross/Primer_D2009.res =================================================================== (Binary files differ) Property changes on: trunk/Demos/PrimerCross/Primer_D2009.res ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Demos/PrimerCross/Primer_D2009.xml =================================================================== --- trunk/Demos/PrimerCross/Primer_D2009.xml (rev 0) +++ trunk/Demos/PrimerCross/Primer_D2009.xml 2009-08-05 10:57:00 UTC (rev 813) @@ -0,0 +1 @@ +<TInstantConnectionDefs><TInstantXMLConnectionDef><Name>XMLDB</Name><IsBuilt>TRUE</IsBuilt><RootFolder>C:\Users\nandod\Work\Projects\instantobjects\Demos\PrimerCross\XMLDB</RootFolder></TInstantXMLConnectionDef></TInstantConnectionDefs> \ No newline at end of file Property changes on: trunk/Demos/PrimerCross/Primer_D2009.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: trunk/Source/Brokers/ADO/InstantADO.pas =================================================================== --- trunk/Source/Brokers/ADO/InstantADO.pas 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Source/Brokers/ADO/InstantADO.pas 2009-08-05 10:57:00 UTC (rev 813) @@ -109,7 +109,6 @@ function CreateDataSet: TDataSet; override; function CreateNavigationalLinkResolver(const ATableName: string): TInstantNavigationalLinkResolver; override; - function Find(const AClassName, AObjectId: string): Boolean; function Locate(const AClassName, AObjectId: string): Boolean; override; public function FormatTableName(const ATableName: string): string; virtual; @@ -827,48 +826,6 @@ Result := TInstantADOLinkResolver.Create(Self, ATableName); end; -function TInstantADOResolver.Find(const AClassName, - AObjectId: string): Boolean; -var - LocateSet: _RecordSet; - Criteria: string; - Bm: OleVariant; - SkipCount: Integer; -begin - with DataSet do - begin - LocateSet := RecordSet.Clone(adLockReadOnly); - Criteria := Format('%s=%s', [InstantIdFieldName, InstantQuote(AObjectId,'''')]); - SkipCount := 0; - Result := False; - if not LocateSet.EOF then - begin - Bm := LocateSet.Bookmark; - while not LocateSet.EOF do - begin - LocateSet.Find(Criteria, SkipCount, adSearchForward, Bm); - Result := not LocateSet.EOF; - if Result then - begin - Bm := LocateSet.Bookmark; - Result := LocateSet.Fields[InstantClassFieldName].Value = AClassName; - if Result then - begin - GotoBookmark(@Bm); - if Recordset.BOF then - begin - Result := False; - CursorPosChanged; - end; - Break; - end; - end; - SkipCount := 1; - end; - end; - end; -end; - function TInstantADOResolver.FormatTableName( const ATableName: string): string; begin @@ -894,8 +851,6 @@ with DataSet do if Supports([coSeek]) then Result := Seek(KeyVals) - else if Supports([coFind]) then - Result := Find(AClassName, AObjectId) else Result := Locate(InstantIndexFieldNames, KeyVals, []); end; Modified: trunk/Source/Brokers/XML/InstantXML.pas =================================================================== --- trunk/Source/Brokers/XML/InstantXML.pas 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Source/Brokers/XML/InstantXML.pas 2009-08-05 10:57:00 UTC (rev 813) @@ -229,6 +229,7 @@ FParamsObject: TParams; FStorageNames: TStringList; FObjectClassNames: TStringList; + FIQLCommand: TInstantIQLCommand; procedure DestroyObjectReferenceList; function GetObjectReferenceCount: Integer; function GetObjectReferenceList: TObjectList; @@ -236,10 +237,16 @@ // Creates an object reference for each item in AFileList that represents // an object of a class included in FObjectClassNames. procedure InitObjectReferences(const AFileList: TStrings); + + procedure SortObjectReferences; function GetParamsObject: TParams; function GetConnector: TInstantXMLConnector; procedure SetStorageNames(const Value: TStringList); procedure SetObjectClassNames(const Value: TStringList); + function SortCompareMethod(Holder, Obj1, Obj2: TInstantObject): Integer; + procedure CreateIQLCommand; + procedure QuickSortObjectReferenceList(List: TList; L, R: Integer; + Compare: TInstantSortCompare); protected class function TranslatorClass: TInstantRelationalTranslatorClass; override; function GetActive: Boolean; override; @@ -319,7 +326,7 @@ uses SysUtils, InstantConsts, InstantClasses, TypInfo, InstantXMLCatalog, - InstantXMLConnectionDefEdit, + InstantXMLConnectionDefEdit, InstantUtils, {$IFDEF MSWINDOWS} {$IFNDEF D6+} FileCtrl, @@ -799,6 +806,7 @@ FObjectClassNames := TStringList.Create; FObjectClassNames.Sorted := True; FObjectClassNames.Duplicates := dupIgnore; + FIQLCommand := TInstantIQLCommand.Create(nil); end; destructor TInstantXMLQuery.Destroy; @@ -807,6 +815,7 @@ FParamsObject.Free; FreeAndNil(FStorageNames); FreeAndNil(FObjectClassNames); + FreeAndNil(FIQLCommand); inherited; end; @@ -965,16 +974,33 @@ vFileList: TStringList; begin inherited; + CreateIQLCommand; + vFileList := TStringList.Create; try Connector.Connection.Open; Connector.Connection.LoadFileList(vFileList, FStorageNames); InitObjectReferences(vFileList); + + if Assigned(FIQLCommand.Order) then + SortObjectReferences; finally vFileList.Free; end; end; +procedure TInstantXMLQuery.CreateIQLCommand; +var + LReader: TInstantIQLReader; +begin + LReader := TInstantIQLReader.Create(TStringStream.Create(Command{$IFDEF D12+}, TEncoding.Unicode{$ENDIF}), True); + try + LReader.ReadObject(FIQLCommand); + finally + FreeAndNil(LReader); + end; +end; + procedure TInstantXMLQuery.InternalReleaseObject(AObject: TObject); var Index: Integer; @@ -1018,6 +1044,70 @@ FStorageNames.Assign(Value); end; +procedure TInstantXMLQuery.QuickSortObjectReferenceList(List: TList; + L, R: Integer; Compare: TInstantSortCompare); +var + I, J, P: Integer; +begin + repeat + I := L; + J := R; + P := (L + R) shr 1; + repeat + while Compare(nil, + TInstantObjectReference(List[I]).Dereference, + TInstantObjectReference(List[P]).Dereference) < 0 do + Inc(I); + while Compare(nil, + TInstantObjectReference(List[J]).Dereference, + TInstantObjectReference(List[P]).Dereference) > 0 do + Dec(J); + if I <= J then + begin + List.Exchange(I, J); + if P = I then + P := J + else if P = J then + P := I; + Inc(I); + Dec(J); + end; + until I > J; + if L < J then + QuickSortObjectReferenceList(List, L, J, Compare); + L := I; + until I >= R; +end; + +procedure TInstantXMLQuery.SortObjectReferences; +begin + if ObjectReferenceList.Count > 0 then + QuickSortObjectReferenceList(ObjectReferenceList, 0, + Pred(ObjectReferenceList.Count), SortCompareMethod); +end; + +function TInstantXMLQuery.SortCompareMethod(Holder, Obj1, + Obj2: TInstantObject): Integer; +var + LOrder: TInstantIQLOrder; +begin + Assert(Assigned(FIQLCommand.Order)); + + Result := 0; + LOrder := FIQLCommand.Order; + Assert(Assigned(LOrder.OrderSpec)); + while Assigned(LOrder) do + begin + Result := InstantCompareObjects(Obj1, Obj2, + LOrder.OrderSpec.Expression.Text, []); + if LOrder.OrderSpec.OrderDirection = odDesc then + Result := -Result; + if Result <> 0 then + Break; + LOrder := LOrder.NextOrder; + end; +end; + class function TInstantXMLQuery.TranslatorClass: TInstantRelationalTranslatorClass; begin @@ -1039,11 +1129,34 @@ end; end; +{$IFDEF UNICODE} function TXMLFilesAccessor.SaveInstantObjectToXmlFile( const AObject: TInstantObject; const AFileName: string): Boolean; var strstream: TStringStream; fileStream: TFileStream; + DataStr: UTF8String; +begin + strstream := TStringStream.Create('', TEncoding.UTF8); + try + InstantWriteObject(strStream, sfXML, AObject); + DataStr := XML_UTF8_HEADER + UTF8String(strStream.DataString); + finally + strStream.Free; + end; + fileStream := TFileStream.Create(AFileName, fmCreate); + try + Result := fileStream.Write(DataStr[1], Length(DataStr)) <> 0; + finally + fileStream.Free; + end; +end; +{$ELSE} +function TXMLFilesAccessor.SaveInstantObjectToXmlFile( + const AObject: TInstantObject; const AFileName: string): Boolean; +var + strstream: TStringStream; + fileStream: TFileStream; DataStr: string; begin strstream := TStringStream.Create(''); @@ -1067,6 +1180,7 @@ fileStream.Free; end; end; +{$ENDIF} function RemoveXmlDeclaration(const xmlString: string): string; var @@ -1079,10 +1193,30 @@ Result := xmlString; end; +{$IFDEF UNICODE} function TXMLFilesAccessor.LoadInstantObjectFromXmlFile( const AObject: TInstantObject; const AObjectId, AFileName: string): Boolean; var fileStream: TFileStream; +begin + if FileExists(AFileName) then + begin + fileStream := TFileStream.Create(AFileName, fmOpenRead); + try + InstantReadObject(fileStream, sfXML, AObject); + Result := True; + finally + fileStream.Free; + end; + end + else + Result := False; +end; +{$ELSE} +function TXMLFilesAccessor.LoadInstantObjectFromXmlFile( + const AObject: TInstantObject; const AObjectId, AFileName: string): Boolean; +var + fileStream: TFileStream; strUtf8: string; strstream: TStringStream; begin @@ -1090,8 +1224,6 @@ try SetLength(strUtf8, fileStream.Size); Result := fileStream.Read(strUtf8[1], fileStream.Size) <> 0; - // skip XML HEADER (until the parser is "dumb") - strUtf8 := RemoveXmlDeclaration(strUtf8); finally fileStream.Free; end; @@ -1108,6 +1240,7 @@ strstream.Free; end; end; +{$ENDIF} function TXMLFilesAccessor.LocateInstantObjectXmlFile(const AObjectClassName, AObjectId, AFileName: string): Boolean; Modified: trunk/Source/Core/InstantClasses.pas =================================================================== --- trunk/Source/Core/InstantClasses.pas 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Source/Core/InstantClasses.pas 2009-08-05 10:57:00 UTC (rev 813) @@ -193,8 +193,9 @@ procedure WriteCharSet(CharSet: TChars); procedure WriteObject(AObject: TPersistent); virtual; procedure WriteProperties(AObject: TPersistent); - // Might be needed for versions of Delphi <7? - //procedure WriteString(const Value: string); + {$IFNDEF UNICODE} + procedure WriteString(const Value: string); + {$ENDIF} procedure WriteValue(Value: TValueType); property Stream: TStream read FStream; end; @@ -249,10 +250,10 @@ {$ELSE} TInstantStringStream = class(TInstantStream) private - function GetDataString: AnsiString; + function GetDataString: string; public constructor Create(AString: string); - property DataString: AnsiString read GetDataString; + property DataString: string read GetDataString; end; {$ENDIF} @@ -268,7 +269,6 @@ function GetWriter: TAbstractWriter; procedure SetPosition(Value: Integer); procedure WriteString(const S: string); - procedure WriteWideString(const S: WideString); protected property TagStack: TStringList read GetTagStack; property Writer: TAbstractWriter read GetWriter; @@ -295,14 +295,15 @@ function GetPosition: Integer; function GetReader: TAbstractReader; function GetToken: TInstantXMLToken; - function ReadEscapedChar: AnsiChar; + function ReadEscapedChar: Char; procedure SetPosition(const Value: Integer); protected procedure CheckToken(AToken: TInstantXMLToken); - function PeekChar: AnsiChar; - function ReadChar: AnsiChar; + function PeekChar: Char; + function ReadChar: Char; procedure SkipBlanks; property Reader: TAbstractReader read GetReader; + function IsProcessingInstruction(const ATagName: string): Boolean; public constructor Create(Stream: TStream); destructor Destroy; override; @@ -313,6 +314,7 @@ function ReadTag: string; function ReadTagName: string; procedure Skip; + procedure SkipProcessingInstruction; property Eof: Boolean read GetEof; property Position: Integer read GetPosition write SetPosition; property Stream: TStream read FStream; @@ -503,6 +505,7 @@ begin with TInstantTextToBinaryConverter.Create(Input, Output) do try + Processor.SkipProcessingInstruction; Convert; finally Free; @@ -513,15 +516,37 @@ AObject: TPersistent = nil): TPersistent; var MemoryStream: TMemoryStream; + {$IFDEF UNICODE} + StringStream: TStringStream; + UStringStream: TStringStream; + {$ENDIF} begin if Format = sfBinary then Result := InstantReadObjectFromStream(Stream, AObject) else begin MemoryStream := TMemoryStream.Create; try + {$IFDEF UNICODE} + StringStream := TStringStream.Create('', TEncoding.UTF8); + try + StringStream.CopyFrom(Stream, Stream.Size); + UStringStream := TStringStream.Create(StringStream.DataString, TEncoding.Unicode); + try + UStringStream.Position := 0; + InstantObjectTextToBinary(UStringStream, MemoryStream); + MemoryStream.Position := 0; + Result := InstantReadObjectFromStream(MemoryStream, AObject); + finally + UStringStream.Free; + end; + finally + StringStream.Free; + end; + {$ELSE} InstantObjectTextToBinary(Stream, MemoryStream); MemoryStream.Position := 0; Result := InstantReadObjectFromStream(MemoryStream, AObject); + {$ENDIF} finally MemoryStream.Free; end; @@ -1058,7 +1083,7 @@ WriteListEnd; end; -(* Might be needed for versions of Delphi <7? +{$IFNDEF UNICODE} procedure TInstantWriter.WriteString(const Value: string); var L: Integer; @@ -1075,7 +1100,7 @@ end; Write(Pointer(Value)^, L); end; -*) +{$ENDIF} procedure TInstantWriter.WriteValue(Value: TValueType); begin @@ -1291,7 +1316,7 @@ end; {$IFNDEF UNICODE} -function TInstantStringStream.GetDataString: AnsiString; +function TInstantStringStream.GetDataString: string; var Pos: Integer; begin @@ -1424,17 +1449,9 @@ U: UTF8String; begin U := UTF8String(S); - Writer.Write(U[1], Length(U)); + Writer.Write(Pointer(U)^, Length(U)); end; -procedure TInstantXMLProducer.WriteWideString(const S: WideString); -var - U : UTF8String; -begin - U := UTF8Encode(S); - Writer.Write(U[1], Length(U)); -end; - { TInstantXMLProcessor } procedure TInstantXMLProcessor.CheckToken(AToken: TInstantXMLToken); @@ -1481,7 +1498,7 @@ Result := xtData; end; -function TInstantXMLProcessor.PeekChar: AnsiChar; +function TInstantXMLProcessor.PeekChar: Char; var Pos: Integer; begin @@ -1517,9 +1534,9 @@ end; end; -function TInstantXMLProcessor.ReadChar: AnsiChar; +function TInstantXMLProcessor.ReadChar: Char; begin - Reader.Read(Result, SizeOf(AnsiChar)); + Reader.Read(Result, SizeOf(Char)); end; function TInstantXMLProcessor.ReadData: string; @@ -1533,11 +1550,11 @@ procedure TInstantXMLProcessor.ReadData(Stream: TStream); var - C: AnsiChar; + C: Char; CharSize: Integer; begin CheckToken(xtData); - CharSize := SizeOf(AnsiChar); + CharSize := SizeOf(Char); while not (PeekChar = InstantTagStart) do begin C := ReadEscapedChar; @@ -1545,7 +1562,7 @@ end; end; -function TInstantXMLProcessor.ReadEscapedChar: AnsiChar; +function TInstantXMLProcessor.ReadEscapedChar: Char; procedure UnEscape; var @@ -1559,7 +1576,7 @@ Result := ReadChar; end; if S[1] = '#' then - Result := AnsiChar(StrToInt(Copy(S, 2, Length(S) - 1))) + Result := Char(StrToInt(Copy(S, 2, Length(S) - 1))) else if S = 'quot' then Result := #34 else if S = 'amp' then @@ -1580,7 +1597,7 @@ function TInstantXMLProcessor.ReadTag: string; var - C: AnsiChar; + C: Char; Pos: Integer; begin Pos := Position; @@ -1595,7 +1612,16 @@ repeat C := ReadChar; Result := Result + C; - until C = InstantTagEnd; + until (C = InstantTagEnd) or (C = ' '); + // Skip attributes. + if C = ' ' then + begin + Delete(Result, Length(Result), 1); + Result := Result + InstantTagEnd; + repeat + C := ReadChar; + until C = InstantTagEnd; + end; end; function TInstantXMLProcessor.ReadTagName: string; @@ -1637,6 +1663,20 @@ ReadChar; end; +procedure TInstantXMLProcessor.SkipProcessingInstruction; +var + LNextTagName: string; +begin + LNextTagName := PeekTagName; + if IsProcessingInstruction(LNextTagName) then + ReadTag; +end; + +function TInstantXMLProcessor.IsProcessingInstruction(const ATagName: string): Boolean; +begin + Result := (ATagName <> '') and (ATagName[1] = InstantProcessingInstructionStart); +end; + { TInstantConverter } procedure TInstantConverter.Convert; @@ -1749,7 +1789,7 @@ vaString, vaLString: Producer.WriteEscapedData(Reader.ReadString); vaUTF8String: - Producer.WriteWideString(Reader.ReadWideString); + Producer.WriteEscapedData(Reader.ReadString); vaSet: begin Reader.ReadValue; @@ -1845,7 +1885,7 @@ procedure ConvertProperty(PropInfo: PPropInfo); var I: Integer; - PropName, ValueStr: String; + PropName, ValueStr: string; S: TStringList; begin PropName := Processor.ReadTagName; @@ -1906,7 +1946,7 @@ begin TagName := Processor.PeekTagName; PropInfo := InstantGetPropInfo(ObjectClass, TagName); - if Assigned(Propinfo) then + if Assigned(PropInfo) then ConvertProperty(PropInfo) else Processor.Skip; @@ -1919,7 +1959,6 @@ Result := Processor.Stream; end; - function TInstantTextToBinaryConverter.GetOutput: TStream; begin Result := Writer.Stream; Modified: trunk/Source/Core/InstantConsts.pas =================================================================== --- trunk/Source/Core/InstantConsts.pas 2009-07-27 13:24:38 UTC (rev 812) +++ trunk/Source/Core/InstantConsts.pas 2009-08-05 10:57:00 UTC (rev 813) @@ -52,6 +52,7 @@ InstantNowString = 'NOW'; InstantTagEnd = '>'; InstantTagStart = '<'; + InstantProcessingInstructionStart = '?'; InstantTimeString = 'TIME'; InstantTrueString = 'TRUE'; InstantEndTagFormat= InstantTagStart + '/%s' + InstantTagEnd; @@ -182,6 +183,7 @@ SUnexpectedAttributeClass = 'Unexpected attribute class for %s(''%s'') in class %s. Expected attribute class %s'; SUnexpectedClass = 'Unexpected class %s. Expected class %s'; SUnexpectedToken = 'Unexpected token ''%s''. Expected token ''%s'''; + SUnexpectedTagName = 'Unexpected tag name ''%s'''; SUnknownAttributeClass = 'Unknown attribute class for attribute %s(''%s'')'; SUnspecifiedCommand = 'Command is not specified'; SUnsupportedColumnSkipped = 'Skipped column %s.%s. Unsupported type %s.'; Modified: trunk/Source/Core/InstantPersistence.pas =====... [truncated message content] |