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: Nando D. <na...@us...> - 2005-02-03 17:05:31
|
Update of /cvsroot/instantobjects/Source/Design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10507/Design Modified Files: InstantReg.pas Log Message: added InstantPump unit (can't tell why it wasn't there) Index: InstantReg.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Design/InstantReg.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstantReg.pas 5 Aug 2004 12:26:35 -0000 1.3 --- InstantReg.pas 3 Feb 2005 17:05:14 -0000 1.4 *************** *** 39,43 **** uses Classes, InstantConsts, InstantPersistence, InstantPresentation, ! InstantExplorer, InstantConnectionManager; procedure Register; --- 39,43 ---- uses Classes, InstantConsts, InstantPersistence, InstantPresentation, ! InstantExplorer, InstantConnectionManager, InstantPump; procedure Register; *************** *** 47,51 **** TInstantExposer, TInstantExplorer, ! TInstantConnectionManager ]); end; --- 47,52 ---- TInstantExposer, TInstantExplorer, ! TInstantConnectionManager, ! TInstantPump ]); end; |
From: Nando D. <na...@us...> - 2005-02-03 17:05:04
|
Update of /cvsroot/instantobjects/Source/Design/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10380/Design/D7 Modified Files: DclIOCore.dpk Log Message: added InstantPump unit (can't tell why it wasn't there) Index: DclIOCore.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Design/D7/DclIOCore.dpk,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DclIOCore.dpk 5 Aug 2004 12:25:05 -0000 1.3 --- DclIOCore.dpk 3 Feb 2005 17:04:52 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- {$R '..\..\Core\InstantPersistence.dcr'} {$R '..\..\Core\InstantConnectionManager.dcr'} + {$R '..\..\Core\InstantPump.dcr'} {$ALIGN 8} {$ASSERTIONS ON} |
From: Nando D. <na...@us...> - 2005-02-03 17:02:13
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9734/Core Modified Files: InstantPersistence.pas Log Message: initial statement cache implementation; minimal statement logging; fix for external collections Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** InstantPersistence.pas 13 Dec 2004 08:57:29 -0000 1.17 --- InstantPersistence.pas 3 Feb 2005 17:01:59 -0000 1.18 *************** *** 1580,1584 **** public constructor Create(AConnector: TInstantConnector); virtual; ! destructor destroy; override; procedure BuildDatabase(Scheme: TInstantScheme); function CreateQuery: TInstantQuery; --- 1580,1584 ---- public constructor Create(AConnector: TInstantConnector); virtual; ! destructor Destroy; override; procedure BuildDatabase(Scheme: TInstantScheme); [...1344 lines suppressed...] + // TODO : implement a shrink policy here when the cache can be limited in size. + // currently the cache is always unlimited if enabled (Capacity <> 0). + end; + + { TInstantStatement } + + constructor TInstantStatement.Create(const AStatementImplementation: TComponent); + begin + inherited Create; + FStatementImplementation := AStatementImplementation; + end; + + destructor TInstantStatement.Destroy; + begin + FStatementImplementation.Free; + inherited; + end; + initialization RegisterClasses([TInstantClassMetadatas, TInstantClassMetadata, |
From: Nando D. <na...@us...> - 2005-02-03 16:57:57
|
Update of /cvsroot/instantobjects/Source/Core/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8826/Core/D7 Modified Files: IOCore.dpk Log Message: added InstantPump unit (can't tell why it wasn't there) Index: IOCore.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/D7/IOCore.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOCore.dpk 20 Jul 2004 16:39:09 -0000 1.1 --- IOCore.dpk 3 Feb 2005 16:57:47 -0000 1.2 *************** *** 47,51 **** InstantAccessors in '..\InstantAccessors.pas', InstantConnectionManager in '..\InstantConnectionManager.pas' {InstantConnectionManagerForm}, ! InstantImageUtils in '..\InstantImageUtils.pas'; end. --- 47,52 ---- InstantAccessors in '..\InstantAccessors.pas', InstantConnectionManager in '..\InstantConnectionManager.pas' {InstantConnectionManagerForm}, ! InstantImageUtils in '..\InstantImageUtils.pas', ! InstantPump in '..\InstantPump.pas'; end. |
From: Nando D. <na...@us...> - 2005-02-03 16:55:06
|
Update of /cvsroot/instantobjects/Source/Brokers/IBX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8260/Brokers/IBX Modified Files: InstantIBX.pas Log Message: changes related to the statement cache Index: InstantIBX.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/InstantIBX.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InstantIBX.pas 16 Sep 2004 11:36:06 -0000 1.5 --- InstantIBX.pas 3 Feb 2005 16:54:53 -0000 1.6 *************** *** 450,460 **** function TInstantIBXBroker.Execute(const AStatement: string; AParams: TParams): Integer; begin ! with CreateDataSet(AStatement, AParams) as TIBQuery do try ! ExecSQL; ! Result := RowsAffected; finally ! Free; end; end; --- 450,462 ---- function TInstantIBXBroker.Execute(const AStatement: string; AParams: TParams): Integer; + var + DataSet: TIBQuery; begin ! DataSet := AcquireDataSet(AStatement, AParams) as TIBQuery; try ! DataSet.ExecSQL; ! Result := DataSet.RowsAffected; finally ! ReleaseDataSet(DataSet); end; end; |
From: Nando D. <na...@us...> - 2005-02-03 16:51:38
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7554/Brokers/UIB Modified Files: InstantUIB.pas Log Message: changes related to the statement cache Index: InstantUIB.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIB.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InstantUIB.pas 17 Dec 2004 11:25:11 -0000 1.4 --- InstantUIB.pas 3 Feb 2005 16:51:28 -0000 1.5 *************** *** 108,112 **** end; ! TInstantUIBBroker= class(TInstantSQLBroker) private function GetDialect: Integer; --- 108,112 ---- end; ! TInstantUIBBroker = class(TInstantSQLBroker) private function GetDialect: Integer; *************** *** 409,426 **** Query: TJvUIBDataSet; begin ! Query := TJvUIBDataSet.Create(NIl); ! with Query do ! begin ! Database := Connector.Connection.Database; ! FetchBlobs := True; ! OnError := etmStayIn; ! OnClose := etmStayIn; ! SQL.Text := AStatement; ! Transaction := Connector.Transaction; ! UniDirectional := True; if Assigned(AParams) then AssignDataSetParams(Query, AParams); end; - Result := Query; end; --- 409,428 ---- Query: TJvUIBDataSet; begin ! Query := TJvUIBDataSet.Create(nil); ! try ! Query.Database := Connector.Connection.Database; ! Query.FetchBlobs := True; ! Query.OnError := etmStayIn; ! Query.OnClose := etmStayIn; ! Query.SQL.Text := AStatement; ! Query.Transaction := Connector.Transaction; ! Query.UniDirectional := True; if Assigned(AParams) then AssignDataSetParams(Query, AParams); + Result := Query; + except + Query.Free; + raise; end; end; *************** *** 456,466 **** function TInstantUIBBroker.Execute(const AStatement: string; AParams: TParams): Integer; begin ! with CreateDataSet(AStatement, AParams) as TJvUIBDataSet do try ! Execute; ! Result := RowsAffected; finally ! Free; end; end; --- 458,470 ---- function TInstantUIBBroker.Execute(const AStatement: string; AParams: TParams): Integer; + var + DataSet: TJvUIBDataSet; begin ! DataSet := AcquireDataSet(AStatement, AParams) as TJvUIBDataSet; try ! DataSet.Execute; ! Result := DataSet.RowsAffected; finally ! ReleaseDataSet(DataSet); end; end; |
From: Nando D. <na...@us...> - 2005-02-03 16:49:19
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6953/Brokers/UIB/D7 Modified Files: IOUIB.dof Log Message: rubbish removed Index: IOUIB.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/IOUIB.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOUIB.dof 11 Oct 2004 08:15:09 -0000 1.1 --- IOUIB.dof 3 Feb 2005 16:49:01 -0000 1.2 *************** *** 1,5 **** [FileVersion] Version=7.0 - [Compiler] A=8 --- 1,4 ---- *************** *** 81,85 **** UnsafeCode=0 UnsafeCast=0 - [Linker] MapFile=0 --- 80,83 ---- *************** *** 92,96 **** ImageBase=4194304 ExeDescription=InstantObjects UIB Run-Time Support (Delphi 7) - [Directories] OutputDir= --- 90,93 ---- *************** *** 103,107 **** DebugSourceDirs= UsePackages=0 - [Parameters] RunParams= --- 100,103 ---- *************** *** 110,119 **** UseLauncher=0 DebugCWD= - [Language] ActiveLang= ProjectLang= RootDir=C:\Work\DelphiComps\D7\IO16\Source\Brokers\IBX\ - [Version Info] IncludeVerInfo=1 --- 106,113 ---- *************** *** 130,134 **** Locale=1040 CodePage=1252 - [Version Info Keys] CompanyName=InstantObjects.org --- 124,127 ---- *************** *** 141,342 **** ProductName=InstantObjects ProductVersion=1.7 ! ! [Exception Log] ! EurekaLog Version=454 ! Activate=0 ! Activate Handle=1 ! Save Log File=1 ! Foreground Tab=0 ! EurekaLogLook=1 ! Freeze Activate=0 ! Freeze Timeout=60 ! Freeze Message=The application seems to be frozen. ! SMTP From=eur...@em... ! SMTP Host= ! SMTP Port=25 ! SMTP UserID= ! SMTP Password= ! SMTP ShowDialog=1 ! ShowExceptionDialog=1 ! Append to Log=0 ! Send Entire Log=0 ! Attach Screenshot=0 ! Show TerminateBtn=1 ! TerminateBtn Operation=1 ! Errors Number=32 ! Errors Terminate=3 ! Email Address= ! Email Object= ! Email Send Options=0 ! Output Path= ! Count=0 ! EMail Message Line Count=0 ! loNoDuplicateErrors=0 ! loAppendReproduceText=0 ! AppStartDate=1 ! AppName=1 ! AppVersionNumber=1 ! AppParameters=1 ! ExcDate=1 ! ExcAddress=1 ! ExcModule=1 ! ExcType=1 ! ExcMessage=1 ! ActCtlsFormClass=1 ! ActCtlsFormText=1 ! ActCtlsControlClass=1 ! ActCtlsControlText=1 ! CmpName=1 ! CmpUser=1 ! CmpTotalMemory=1 ! CmpFreeMemory=1 ! CmpTotalDisk=1 ! CmpFreeDisk=1 ! OSType=1 ! OSBuildN=1 ! OSUpdate=1 ! OSLanguage=1 ! Count mtInformationMsgCaption=1 ! mtInformationMsgCaption0=Information. ! Count mtQuestionMsgCaption=1 ! mtQuestionMsgCaption0=Question. ! Count mtDialog_Caption=1 ! mtDialog_Caption0=Error. ! Count mtDialog_ErrorMsgCaption=2 ! mtDialog_ErrorMsgCaption0=An error has occurred during program execution. ! mtDialog_ErrorMsgCaption1=Please read the following information for further details. ! Count mtDialog_GeneralCaption=1 ! mtDialog_GeneralCaption0=General ! Count mtDialog_GeneralHeader=1 ! mtDialog_GeneralHeader0=General Information ! Count mtDialog_CallStackCaption=1 ! mtDialog_CallStackCaption0=Call Stack ! Count mtDialog_CallStackHeader=1 ! mtDialog_CallStackHeader0=Call Stack Information ! Count mtDialog_ModulesCaption=1 ! mtDialog_ModulesCaption0=Modules ! Count mtDialog_ModulesHeader=1 ! mtDialog_ModulesHeader0=Modules Information ! Count mtDialog_CPUCaption=1 ! mtDialog_CPUCaption0=CPU ! Count mtDialog_CPUHeader=1 ! mtDialog_CPUHeader0=CPU Information ! Count mtDialog_OKButtonCaption=1 ! mtDialog_OKButtonCaption0=&OK ! Count mtDialog_TerminateButtonCaption=1 ! mtDialog_TerminateButtonCaption0=&Terminate ! Count mtDialog_RestartButtonCaption=1 ! mtDialog_RestartButtonCaption0=&Restart ! Count mtDialog_DetailsButtonCaption=1 ! mtDialog_DetailsButtonCaption0=&Details ! Count mtDialog_EmailMessage=1 ! mtDialog_EmailMessage0=&Send this error via Email ! Count mtDialog_ScreenshotMessage=1 ! mtDialog_ScreenshotMessage0=&Attach a Screenshot image ! Count mtDialog_CopyMessage=1 ! mtDialog_CopyMessage0=&Copy to Clipboard ! Count mtLog_AppHeader=1 ! mtLog_AppHeader0=Application ! Count mtLog_AppStartDate=1 ! mtLog_AppStartDate0=Start Date ! Count mtLog_AppName=1 ! mtLog_AppName0=Name/Description ! Count mtLog_AppVersionNumber=1 ! mtLog_AppVersionNumber0=Version Number ! Count mtLog_AppParameters=1 ! mtLog_AppParameters0=Parameters ! Count mtLog_ExcHeader=1 ! mtLog_ExcHeader0=Exception ! Count mtLog_ExcDate=1 ! mtLog_ExcDate0=Date ! Count mtLog_ExcAddress=1 ! mtLog_ExcAddress0=Address ! Count mtLog_ExcModule=1 ! mtLog_ExcModule0=Module ! Count mtLog_ExcType=1 ! mtLog_ExcType0=Type ! Count mtLog_ExcMessage=1 ! mtLog_ExcMessage0=Message ! Count mtLog_ActCtrlsHeader=1 ! mtLog_ActCtrlsHeader0=Active Controls ! Count mtLog_ActCtrlsFormClass=1 ! mtLog_ActCtrlsFormClass0=Form Class ! Count mtLog_ActCtrlsFormText=1 ! mtLog_ActCtrlsFormText0=Form Text ! Count mtLog_ActCtrlsControlClass=1 ! mtLog_ActCtrlsControlClass0=Control Class ! Count mtLog_ActCtrlsControlText=1 ! mtLog_ActCtrlsControlText0=Control Text ! Count mtLog_CmpHeader=1 ! mtLog_CmpHeader0=Computer ! Count mtLog_CmpName=1 ! mtLog_CmpName0=Name ! Count mtLog_CmpUser=1 ! mtLog_CmpUser0=User ! Count mtLog_CmpTotalMemory=1 ! mtLog_CmpTotalMemory0=Total Memory ! Count mtLog_CmpFreeMemory=1 ! mtLog_CmpFreeMemory0=Free Memory ! Count mtLog_CmpTotalDisk=1 ! mtLog_CmpTotalDisk0=Total Disk ! Count mtLog_CmpFreeDisk=1 ! mtLog_CmpFreeDisk0=Free Disk ! Count mtLog_OSHeader=1 ! mtLog_OSHeader0=Operating System ! Count mtLog_OSType=1 ! mtLog_OSType0=Type ! Count mtLog_OSBuildN=1 ! mtLog_OSBuildN0=Build # ! Count mtLog_OSUpdate=1 ! mtLog_OSUpdate0=Update ! Count mtLog_OSLanguage=1 ! mtLog_OSLanguage0=Language ! Count mtCallStack_Address=1 ! mtCallStack_Address0=Address ! Count mtCallStack_Name=1 ! mtCallStack_Name0=Module ! Count mtCallStack_Unit=1 ! mtCallStack_Unit0=Unit ! Count mtCallStack_Class=1 ! mtCallStack_Class0=Class ! Count mtCallStack_Procedure=1 ! mtCallStack_Procedure0=Procedure/Method ! Count mtCallStack_Line=1 ! mtCallStack_Line0=Line ! Count mtSMTPDialog_Caption=1 ! mtSMTPDialog_Caption0=SMTP. ! Count mtSMTPDialog_Message=1 ! mtSMTPDialog_Message0=Message ! Count mtSMTPDialog_Resolving=1 ! mtSMTPDialog_Resolving0=Resolving MX record... ! Count mtSMTPDialog_Connecting=1 ! mtSMTPDialog_Connecting0=Connecting with SMTP server... ! Count mtSMTPDialog_Connected=1 ! mtSMTPDialog_Connected0=Connected with SMTP server. ! Count mtSMTPDialog_Sending=1 ! mtSMTPDialog_Sending0=Sending message... ! Count mtReproduceDialog_Caption=1 ! mtReproduceDialog_Caption0=Request ! Count mtReproduceDialog_Request=1 ! mtReproduceDialog_Request0=Please describe the steps to reproduce the error: ! Count mtReproduceDialog_OKButtonCaption=1 ! mtReproduceDialog_OKButtonCaption0=&OK ! Count mtModules_Handle=1 ! mtModules_Handle0=Handle ! Count mtModules_Name=1 ! mtModules_Name0=Name ! Count mtModules_Description=1 ! mtModules_Description0=Description ! Count mtModules_Version=1 ! mtModules_Version0=Version ! Count mtModules_Size=1 ! mtModules_Size0=Size ! Count mtModules_Path=1 ! mtModules_Path0=Path ! Count mtCPU_Registers=1 ! mtCPU_Registers0=Registers ! Count mtCPU_Stack=1 ! mtCPU_Stack0=Stack ! Count mtCPU_MemoryDump=1 ! mtCPU_MemoryDump0=Memory Dump ! --- 134,138 ---- ProductName=InstantObjects ProductVersion=1.7 ! [HistoryLists\hlUnitAliases] ! Count=1 ! Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
From: Nando D. <na...@us...> - 2005-02-03 15:33:32
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22298/Brokers/UIB/D7 Modified Files: DclIOUIB.dpk Log Message: spurious dependency on IBX removed Index: DclIOUIB.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/DclIOUIB.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOUIB.dpk 11 Oct 2004 08:15:09 -0000 1.1 --- DclIOUIB.dpk 3 Feb 2005 15:33:23 -0000 1.2 *************** *** 32,36 **** vcl, vcldb, - ibxpress, IOCore, IOUIB; --- 32,35 ---- |
From: Carlo B. <car...@us...> - 2004-12-17 11:25:21
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11133/Source/Brokers/UIB Modified Files: InstantUIB.pas Log Message: bug fixing: null parameters Index: InstantUIB.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIB.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstantUIB.pas 3 Dec 2004 16:04:29 -0000 1.3 --- InstantUIB.pas 17 Dec 2004 11:25:11 -0000 1.4 *************** *** 372,397 **** begin SourceParam := AParams[I]; ! case SourceParam.DataType of ! ftString: ! TargetParams.ByNameAsString[SourceParam.Name] := SourceParam.AsString; ! ftInteger: ! TargetParams.ByNameAsInteger[SourceParam.Name] := SourceParam.AsInteger; ! ftFloat: ! TargetParams.ByNameAsDouble[SourceParam.Name] := SourceParam.AsFloat; ! ftCurrency: ! TargetParams.ByNameAsCurrency[SourceParam.Name] := SourceParam.AsCurrency; ! ftDateTime: ! TargetParams.ByNameAsDateTime[SourceParam.Name] := SourceParam.AsDateTime; ! ftBoolean: ! TargetParams.ByNameAsBoolean[SourceParam.Name] := SourceParam.AsBoolean; ! ftBlob, ftMemo: ! begin ! BlobContent := SourceParam.AsString; ! TJvUIBDataset(DataSet).ParamsSetBlob(SourceParam.Name, BlobContent); ! end; else ! raise Exception.Create('Parameter data type not supported: ' + ! GetEnumName(TypeInfo(TFieldType), Ord(SourceParam.DataType))); ! end; end; end; --- 372,404 ---- begin SourceParam := AParams[I]; ! if SourceParam.IsNull then ! begin ! TargetParams.ByNameIsNull[SourceParam.Name]; ! end else ! begin ! case SourceParam.DataType of ! ftString: ! TargetParams.ByNameAsString[SourceParam.Name] := SourceParam.AsString; ! ftInteger: ! TargetParams.ByNameAsInteger[SourceParam.Name] := SourceParam.AsInteger; ! ftFloat: ! TargetParams.ByNameAsDouble[SourceParam.Name] := SourceParam.AsFloat; ! ftCurrency: ! TargetParams.ByNameAsCurrency[SourceParam.Name] := SourceParam.AsCurrency; ! ftDateTime: ! TargetParams.ByNameAsDateTime[SourceParam.Name] := SourceParam.AsDateTime; ! ftBoolean: ! TargetParams.ByNameAsBoolean[SourceParam.Name] := SourceParam.AsBoolean; ! ftBlob, ftMemo: ! begin ! BlobContent := SourceParam.AsString; ! TJvUIBDataset(DataSet).ParamsSetBlob(SourceParam.Name, BlobContent); ! end; ! else ! raise Exception.Create('Parameter data type not supported: ' + ! GetEnumName(TypeInfo(TFieldType), Ord(SourceParam.DataType))); ! end; ! end; end; end; |
From: Carlo B. <car...@us...> - 2004-12-13 08:57:39
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22129/Source/Core Modified Files: InstantPersistence.pas Log Message: TInstantCurrency clone bug fixed. Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** InstantPersistence.pas 7 Dec 2004 12:13:48 -0000 1.16 --- InstantPersistence.pas 13 Dec 2004 08:57:29 -0000 1.17 *************** *** 4706,4711 **** begin inherited; ! if Source is TInstantFloat then ! Value := TInstantFloat(Source).Value; end; --- 4706,4711 ---- begin inherited; ! if Source is TInstantCurrency then ! Value := TInstantCurrency(Source).Value; end; |
From: Andrea P. <and...@us...> - 2004-12-07 12:13:58
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15457/Core Modified Files: InstantPersistence.pas Log Message: On-demand loading for TParts Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** InstantPersistence.pas 19 Nov 2004 13:14:12 -0000 1.15 --- InstantPersistence.pas 7 Dec 2004 12:13:48 -0000 1.16 *************** *** 967,970 **** --- 967,972 ---- TInstantParts = class(TInstantContainer) private + FAllowOwned: Boolean; + FObjectReferenceList: TObjectList; FObjectList: TObjectList; function GetObjectList: TObjectList; *************** *** 972,979 **** --- 974,989 ---- [...1247 lines suppressed...] end --- 14499,14503 ---- Params.Free; end; ! //Changed; end; end *************** *** 14319,14323 **** Params.Free; end; ! Changed; end; end --- 14534,14538 ---- Params.Free; end; ! //Changed; end; end |
From: Carlo B. <car...@us...> - 2004-12-07 08:56:03
|
Update of /cvsroot/instantobjects/Demos/PrimerCross In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6997/Demos/PrimerCross Modified Files: PrimerK3.dpr Log Message: Primer Demo for Kilix3 Index: PrimerK3.dpr =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PrimerK3.dpr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PrimerK3.dpr 4 Aug 2004 22:43:38 -0000 1.2 --- PrimerK3.dpr 7 Dec 2004 08:55:53 -0000 1.3 *************** *** 38,42 **** QForms, Main in 'Main.pas' {MainForm}, ! Model in 'Model.pas', ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, --- 38,42 ---- QForms, Main in 'Main.pas' {MainForm}, ! Model in 'Model/Model.pas', ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, |
From: Carlo B. <car...@us...> - 2004-12-07 08:52:53
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6442/Source/Core Modified Files: InstantConnectionManager.pas Log Message: Added database creation before building. Index: InstantConnectionManager.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantConnectionManager.pas,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** InstantConnectionManager.pas 3 Dec 2004 16:04:29 -0000 1.7 --- InstantConnectionManager.pas 7 Dec 2004 08:52:44 -0000 1.8 *************** *** 400,403 **** --- 400,405 ---- try Application.ProcessMessages; + if not Connector.DatabaseExists then + Connector.CreateDatabase; Connector.BuildDatabase(Model); Connector.Connect; |
From: Carlo B. <car...@us...> - 2004-12-07 08:51:53
|
Update of /cvsroot/instantobjects/Source/Design/K3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6176/Source/Design/K3 Added Files: DclIOCore.dpk Log Message: Design and RunTime package for Kylix3 --- NEW FILE: DclIOCore.dpk --- package DclIOCore; {$R *.res} {$R '../iodesimages.res'} {$R '../../Core/InstantPresentation.dcr'} {$R '../../Core/InstantPersistence.dcr'} {$R '../../Core/InstantConnectionManager.dcr'} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$DESCRIPTION 'InstantObjects Design-Time Package (Kylix 3)'} {$LIBSUFFIX '_K3'} {$DESIGNONLY} {$IMPLICITBUILD OFF} requires designide, dataclx, visualdbclx; contains InstantWizard in '../InstantWizard.pas', InstantClassEditor in '../InstantClassEditor.pas' {InstantClassEditorForm: TIOBaseForm}, InstantCommandEditor in '../InstantCommandEditor.pas' {InstantCommandEditorForm}, InstantDesignResources in '../InstantDesignResources.pas' {InstantDesignResourceModule: TDataModule}, InstantDesignTools in '../InstantDesignTools.pas', InstantDesignUtils in '../InstantDesignUtils.pas', InstantDialog in '../InstantDialog.pas' {InstantDialogForm}, InstantDualList in '../InstantDualList.pas' {InstantDualListForm}, InstantEdit in '../InstantEdit.pas' {InstantEditForm}, InstantModelExpert in '../InstantModelExpert.pas', InstantOTA in '../InstantOTA.pas', InstantReg in '../InstantReg.pas', InstantUnitSelect in '../InstantUnitSelect.pas' {InstantUnitSelectForm}, InstantAttributeEditor in '../InstantAttributeEditor.pas' {InstantAttributeEditorForm}, InstantAbout in '../InstantAbout.pas' {InstantAboutForm}, InstantPump in '../../Core/InstantPump.pas'; end. |
From: Carlo B. <car...@us...> - 2004-12-07 08:51:52
|
Update of /cvsroot/instantobjects/Source/Core/K3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6176/Source/Core/K3 Added Files: IOCore.dpk Log Message: Design and RunTime package for Kylix3 --- NEW FILE: IOCore.dpk --- package IOCore; {$R *.res} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$DESCRIPTION 'InstantObjects Run-Time Package (Kylix 3)'} {$LIBSUFFIX '_K3'} {$RUNONLY} {$IMPLICITBUILD OFF} requires rtl, visualclx, dataclx, visualdbclx; contains InstantUtils in '../InstantUtils.pas', InstantClasses in '../InstantClasses.pas', InstantConsts in '../InstantConsts.pas', InstantRtti in '../InstantRtti.pas', InstantCommand in '../InstantCommand.pas', InstantPersistence in '../InstantPersistence.pas', InstantExplorer in '../InstantExplorer.pas', InstantDesignHook in '../InstantDesignHook.pas', InstantCode in '../InstantCode.pas', InstantTextFiler in '../InstantTextFiler.pas', InstantPresentation in '../InstantPresentation.pas', InstantAccessors in '../InstantAccessors.pas', InstantConnectionManager in '../InstantConnectionManager.pas' {InstantConnectionManagerForm}, InstantImageUtils in '../InstantImageUtils.pas'; end. |
From: Carlo B. <car...@us...> - 2004-12-07 08:48:30
|
Update of /cvsroot/instantobjects/Source/Design/K3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5544/K3 Log Message: Directory /cvsroot/instantobjects/Source/Design/K3 added to the repository |
Update of /cvsroot/instantobjects/Demos/PrimerCross In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4987/Demos/PrimerCross Modified Files: CompanyBrowse.pas CompanyEdit.pas ContactBrowse.pas ContactEdit.pas ContactFilterEdit.pas ContactSort.pas ContactView.pas CountryBrowse.pas DemoData.pas Main.pas MainData.pas PerformanceView.pas PersonBrowse.pas PersonEdit.pas Primer.cfg Primer.dof Primer.dpr PrimerExternal.cfg PrimerExternal.dpr PrimerExternal.mdr Welcome.dfm Welcome.pas Removed Files: Model.pas ModelExternal.pas Log Message: PrimerCross Demo with internal and external storage of Part and Parts: internal Model.pas is now located in Model forlder; external Model.pas is now located in ExternalModel forlder Index: PerformanceView.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PerformanceView.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PerformanceView.pas 6 Dec 2004 08:49:15 -0000 1.4 --- PerformanceView.pas 7 Dec 2004 08:45:33 -0000 1.5 *************** *** 171,176 **** uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! DemoData, IniFiles, Utility; { TTestResult } --- 171,175 ---- uses ! Model, DemoData, IniFiles, Utility; { TTestResult } Index: ContactBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactBrowse.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ContactBrowse.pas 6 Dec 2004 08:49:15 -0000 1.2 --- ContactBrowse.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 10,18 **** {$ENDIF} {$IFDEF LINUX} ! QGraphics, QControls, QForms, QDialogs, QStdCtrls, ! QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, QTypes, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! BasicBrowse, DB, InstantPresentation; type --- 10,17 ---- {$ENDIF} {$IFDEF LINUX} ! QGraphics, QControls, QForms, QDialogs, QStdCtrls, QTypes, ! QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, {$ENDIF} ! BasicBrowse, DB, InstantPresentation, Model; type Index: CompanyEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/CompanyEdit.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CompanyEdit.pas 6 Dec 2004 08:49:15 -0000 1.4 --- CompanyEdit.pas 7 Dec 2004 08:45:33 -0000 1.5 *************** *** 14,19 **** QMask, QDBCtrls, QComCtrls, QMenus, QImgList, QActnList, QButtons, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactEdit, DB, InstantPresentation; type --- 14,18 ---- QMask, QDBCtrls, QComCtrls, QMenus, QImgList, QActnList, QButtons, {$ENDIF} ! ContactEdit, DB, InstantPresentation, Model; type Index: Primer.dof =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Primer.dof,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Primer.dof 17 Nov 2004 20:59:47 -0000 1.3 --- Primer.dof 7 Dec 2004 08:45:33 -0000 1.4 *************** *** 95,100 **** PackageDLLOutputDir= PackageDCPOutputDir= ! SearchPath=$(DELPHI)\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML ! Packages=VCL50;VCLX50;VCLSMP50;VCLDB50;ibevnt50;VCLBDE50;VCLDBX50;QRPT50;TEEUI50;TEEDB50;TEE50;DSS50;TEEQR50;VCLIB50;VCLMID50;VCLIE50;INETDB50;INET50;NMFAST50;WEBMID50;dclocx50;dclaxserver50;RBTDBC51;RBRCL45;RBCIDE45;RBIDE45;RBBDE45;RBUSER45;RBDB45;dclRBA45;VCLADO50;RBDAD45;dclRBI45;RBDBDE45;RBDIDE45;TSDG5201;TSG5201;vcl;vcldb;bdertl;iobde60 Conditionals= DebugSourceDirs= --- 95,100 ---- PackageDLLOutputDir= PackageDCPOutputDir= ! SearchPath=$(DELPHI)\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB ! Packages= Conditionals= DebugSourceDirs= Index: Primer.cfg =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Primer.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Primer.cfg 29 Jul 2004 20:43:09 -0000 1.2 --- Primer.cfg 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 34,41 **** -LE"c:\programmi\borland\delphi7\Projects\Bpl" -LN"c:\programmi\borland\delphi7\Projects\Bpl" ! -U"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -O"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -I"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -R"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" -w-UNIT_PLATFORM -w-UNSAFE_TYPE --- 34,41 ---- -LE"c:\programmi\borland\delphi7\Projects\Bpl" -LN"c:\programmi\borland\delphi7\Projects\Bpl" ! -U"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" ! -O"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" ! -I"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" ! -R"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" -w-UNIT_PLATFORM -w-UNSAFE_TYPE Index: PersonEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PersonEdit.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PersonEdit.pas 6 Dec 2004 08:49:16 -0000 1.5 --- PersonEdit.pas 7 Dec 2004 08:45:33 -0000 1.6 *************** *** 13,18 **** QGrids, QDBGrids, QMask, QDBCtrls, QComCtrls, QButtons, QImgList, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactEdit, DB, InstantPresentation; type --- 13,17 ---- QGrids, QDBGrids, QMask, QDBCtrls, QComCtrls, QButtons, QImgList, {$ENDIF} ! ContactEdit, DB, InstantPresentation, Model; type Index: MainData.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/MainData.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MainData.pas 6 Dec 2004 08:49:15 -0000 1.2 --- MainData.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 34,38 **** uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal;{$ELSE}Model;{$ENDIF} {$R *.dfm} --- 34,38 ---- uses ! Model; {$R *.dfm} Index: PrimerExternal.dpr =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PrimerExternal.dpr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PrimerExternal.dpr 6 Dec 2004 08:49:16 -0000 1.1 --- PrimerExternal.dpr 7 Dec 2004 08:45:33 -0000 1.2 *************** *** 2,6 **** * InstantObjects * Primer Demo - with "external storage" of Part and Parts ! * *) --- 2,6 ---- * InstantObjects * Primer Demo - with "external storage" of Part and Parts ! * Model.pas unit is located in ModelExternal folder *) *************** *** 38,42 **** Forms, Main in 'Main.pas' {MainForm}, ! ModelExternal in 'ModelExternal.pas', ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, --- 38,42 ---- Forms, Main in 'Main.pas' {MainForm}, ! Model in 'ModelExternal\Model.pas', ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, *************** *** 65,73 **** {$R *.res} ! {$R *.mdr} {ModelExternal} begin Application.Initialize; ! Application.Title := 'InstantObjects Primer (Delphi/Kylix cross platform version)'; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMainDataModule, MainDataModule); --- 65,73 ---- {$R *.res} ! {$R *.mdr} {Model} begin Application.Initialize; ! Application.Title := 'InstantObjects Primer Demo with "external storage" of Part and Parts'; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMainDataModule, MainDataModule); Index: PrimerExternal.cfg =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PrimerExternal.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PrimerExternal.cfg 6 Dec 2004 08:49:16 -0000 1.1 --- PrimerExternal.cfg 7 Dec 2004 08:45:33 -0000 1.2 *************** *** 34,42 **** -LE"c:\programmi\borland\delphi7\Projects\Bpl" -LN"c:\programmi\borland\delphi7\Projects\Bpl" ! -U"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -O"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -I"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -R"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" ! -DEXTERNALSTORAGE -w-UNIT_PLATFORM -w-UNSAFE_TYPE --- 34,41 ---- -LE"c:\programmi\borland\delphi7\Projects\Bpl" -LN"c:\programmi\borland\delphi7\Projects\Bpl" ! -U"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" ! -O"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" ! -I"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" ! -R"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Brokers\UIB" -w-UNIT_PLATFORM -w-UNSAFE_TYPE Index: Welcome.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Welcome.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Welcome.pas 20 Jul 2004 11:05:15 -0000 1.1 --- Welcome.pas 7 Dec 2004 08:45:34 -0000 1.2 *************** *** 50,53 **** --- 50,54 ---- procedure TWelcomeForm.FormCreate(Sender: TObject); begin + TitleLabel.Caption := Application.Title; {$IFDEF MSWINDOWS} BorderStyle := bsNone; Index: Primer.dpr =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Primer.dpr,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Primer.dpr 6 Dec 2004 08:49:16 -0000 1.3 --- Primer.dpr 7 Dec 2004 08:45:33 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- * InstantObjects * Primer Demo - with "internal storage" of Part and Parts + * Model.pas unit is located in Model folder * *) *************** *** 38,42 **** Forms, Main in 'Main.pas' {MainForm}, ! Model in 'Model.pas', ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, --- 39,43 ---- Forms, Main in 'Main.pas' {MainForm}, ! Model in 'Model\Model.pas', ContactView in 'ContactView.pas' {ContactViewForm: TFrame}, BasicView in 'BasicView.pas' {BasicViewForm: TFrame}, *************** *** 69,73 **** begin Application.Initialize; ! Application.Title := 'InstantObjects Primer (Delphi/Kylix cross platform version)'; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMainDataModule, MainDataModule); --- 70,74 ---- begin Application.Initialize; ! Application.Title := 'InstantObjects Primer Demo (Delphi/Kylix cross platform version)'; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMainDataModule, MainDataModule); Index: Welcome.dfm =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Welcome.dfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Welcome.dfm 20 Jul 2004 11:05:15 -0000 1.1 --- Welcome.dfm 7 Dec 2004 08:45:34 -0000 1.2 *************** *** 40,46 **** Alignment = taCenter AutoSize = False ! Caption = ! 'Welcome to InstantObjects Primer (Delphi/Kylix cross-platform ve' + ! 'rsion)' Color = clBtnFace Font.Charset = DEFAULT_CHARSET --- 40,44 ---- Alignment = taCenter AutoSize = False ! Caption = 'Application title' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Index: PrimerExternal.mdr =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PrimerExternal.mdr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsnvRsXk and /tmp/cvsnS7PCH differ Index: ContactFilterEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactFilterEdit.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ContactFilterEdit.pas 6 Dec 2004 08:49:15 -0000 1.2 --- ContactFilterEdit.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 13,18 **** QStdCtrls, QGrids, QDBGrids, QMask, QDBCtrls, QExtCtrls, QComCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactEdit, DB, InstantPresentation; type --- 13,17 ---- QStdCtrls, QGrids, QDBGrids, QMask, QDBCtrls, QExtCtrls, QComCtrls, {$ENDIF} ! ContactEdit, DB, InstantPresentation, Model; type Index: PersonBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PersonBrowse.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PersonBrowse.pas 6 Dec 2004 08:49:16 -0000 1.2 --- PersonBrowse.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 13,18 **** QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, QStdCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactBrowse, Db, InstantPresentation; type --- 13,17 ---- QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, QStdCtrls, {$ENDIF} ! ContactBrowse, Db, InstantPresentation, Model; type Index: ContactEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactEdit.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ContactEdit.pas 6 Dec 2004 08:49:15 -0000 1.2 --- ContactEdit.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 13,18 **** QStdCtrls, QExtCtrls, QMask, QDBCtrls, QGrids, QDBGrids, QComCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! BasicEdit, Db, InstantPresentation; type --- 13,17 ---- QStdCtrls, QExtCtrls, QMask, QDBCtrls, QGrids, QDBGrids, QComCtrls, {$ENDIF} ! BasicEdit, Db, InstantPresentation, Model; type Index: ContactView.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactView.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ContactView.pas 6 Dec 2004 08:49:15 -0000 1.4 --- ContactView.pas 7 Dec 2004 08:45:33 -0000 1.5 *************** *** 21,26 **** QStdCtrls, QActnList, QImgList, QMenus, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! BasicView, InstantPresentation, InstantExplorer; type --- 21,25 ---- QStdCtrls, QActnList, QImgList, QMenus, {$ENDIF} ! BasicView, Model, InstantPresentation, InstantExplorer; type --- Model.pas DELETED --- Index: Main.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Main.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Main.pas 6 Dec 2004 08:49:15 -0000 1.5 --- Main.pas 7 Dec 2004 08:45:33 -0000 1.6 *************** *** 122,128 **** uses ! Contnrs, ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! Welcome, MainData, RandomData, DemoData, Utility, ContactView, PerformanceView, {$IFDEF MSWINDOWS} HelpView, JPeg, --- 122,126 ---- uses ! Contnrs, Model, Welcome, MainData, RandomData, DemoData, Utility, ContactView, PerformanceView, {$IFDEF MSWINDOWS} HelpView, JPeg, *************** *** 139,150 **** installed all brokers, please remove the missing broker unit(s) from the list. } {$IFDEF MSWINDOWS} {$IFNDEF VER130} InstantDBX, {$ENDIF} ! InstantADO, InstantBDE, InstantIBX, InstantUIB, {$ENDIF} {$IFDEF LINUX} ! InstantDBX, InstantUIB, {$ENDIF} InstantXML; --- 137,149 ---- installed all brokers, please remove the missing broker unit(s) from the list. } + {$IFDEF MSWINDOWS} {$IFNDEF VER130} InstantDBX, {$ENDIF} ! InstantADO, InstantBDE, InstantIBX, {$ENDIF} {$IFDEF LINUX} ! InstantDBX, {$ENDIF} InstantXML; Index: CountryBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/CountryBrowse.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CountryBrowse.pas 6 Dec 2004 08:49:15 -0000 1.2 --- CountryBrowse.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 15,20 **** QComCtrls, QStdCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! InstantPresentation; type --- 15,19 ---- QComCtrls, QStdCtrls, {$ENDIF} ! InstantPresentation, Model; type Index: ContactSort.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactSort.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ContactSort.pas 6 Dec 2004 08:49:15 -0000 1.2 --- ContactSort.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 41,46 **** uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! TypInfo, InstantRtti, InstantPresentation; {$R *.dfm} --- 41,45 ---- uses ! Model, TypInfo, InstantRtti, InstantPresentation; {$R *.dfm} Index: CompanyBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/CompanyBrowse.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CompanyBrowse.pas 6 Dec 2004 08:49:15 -0000 1.2 --- CompanyBrowse.pas 7 Dec 2004 08:45:33 -0000 1.3 *************** *** 13,18 **** QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactBrowse, DB, InstantPresentation; type --- 13,17 ---- QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, {$ENDIF} ! ContactBrowse, DB, InstantPresentation, Model; type Index: DemoData.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/DemoData.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DemoData.pas 6 Dec 2004 08:49:15 -0000 1.3 --- DemoData.pas 7 Dec 2004 08:45:33 -0000 1.4 *************** *** 4,9 **** uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! Classes, InstantPersistence, RandomData; procedure CreateCategories; --- 4,8 ---- uses ! Classes, Model, InstantPersistence, RandomData; procedure CreateCategories; *************** *** 181,185 **** Result.BirthDate := Date - (20 * 365 + Random(365 * 50)); // 20 - 70 years old Result.Address := CreateRandomAddress; ! Result.Salary := 922337203685470; CreateRandomPhones(Result, ['Home', 'Mobile']); if Assigned(Company) then --- 180,185 ---- Result.BirthDate := Date - (20 * 365 + Random(365 * 50)); // 20 - 70 years old Result.Address := CreateRandomAddress; ! // Result.Salary := 922337203685470; ! Result.Salary := 500 + Random(5000); CreateRandomPhones(Result, ['Home', 'Mobile']); if Assigned(Company) then --- ModelExternal.pas DELETED --- |
From: Carlo B. <car...@us...> - 2004-12-07 08:45:46
|
Update of /cvsroot/instantobjects/Demos/PrimerCross/ModelExternal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4987/Demos/PrimerCross/ModelExternal Added Files: Model.pas Log Message: PrimerCross Demo with internal and external storage of Part and Parts: internal Model.pas is now located in Model forlder; external Model.pas is now located in ExternalModel forlder --- NEW FILE: Model.pas --- (* * PrimerCross demo: * Model.pas with "external storage" of Part and Parts * *) unit Model; interface uses InstantPersistence; type TAddress = class; TCategory = class; TCompany = class; TContact = class; TContactFilter = class; TCountry = class; TEmail = class; TPerson = class; TPhone = class; TAddress = class(TInstantObject) { IOMETADATA stored; City: String(30) index; Country: Reference(TCountry); State: String(4); Street: Memo; Zip: String(10); } _City: TInstantString; _Country: TInstantReference; _State: TInstantString; _Street: TInstantMemo; _Zip: TInstantString; private function GetCity: string; function GetCountry: TCountry; function GetState: string; function GetStreet: string; function GetZip: string; procedure SetCity(const Value: string); procedure SetCountry(Value: TCountry); procedure SetState(const Value: string); procedure SetStreet(const Value: string); procedure SetZip(const Value: string); published property City: string read GetCity write SetCity; property Country: TCountry read GetCountry write SetCountry; property State: string read GetState write SetState; property Street: string read GetStreet write SetStreet; property Zip: string read GetZip write SetZip; end; TCountry = class(TInstantObject) { IOMETADATA stored; Name: String(30); } _Name: TInstantString; private function GetName: string; procedure SetName(const Value: string); protected procedure BeforeStore; override; function GetCaption: string; override; published property Id; property Name: string read GetName write SetName; end; TPhone = class(TInstantObject) { IOMETADATA stored; Name: String(20); Number: String(20) mask '(000) 000-0000;0;_'; } _Name: TInstantString; _Number: TInstantString; private function GetName: string; function GetNumber: string; procedure SetName(const Value: string); procedure SetNumber(const Value: string); published property Name: string read GetName write SetName; property Number: string read GetNumber write SetNumber; end; TEmail = class(TInstantObject) { IOMETADATA stored; Address: String(100); } _Address: TInstantString; private function GetAddress: string; procedure SetAddress(const Value: string); published property Address: string read GetAddress write SetAddress; end; TCategory = class(TInstantObject) { IOMETADATA stored; Name: String(30); } _Name: TInstantString; private function GetName: string; procedure SetName(const Value: string); protected function GetCaption: string; override; published property Name: string read GetName write SetName; end; TContact = class(TInstantObject) { IOMETADATA stored; Address: Part(TAddress) externalstored 'Contact_Address'; Category: Reference(TCategory); City: String(30) index; Name: String(50) index; Phones: Parts(TPhone) externalstored 'Contact_Phone'; } _Address: TInstantPart; _Category: TInstantReference; _City: TInstantString; _Name: TInstantString; _Phones: TInstantParts; private function GetAddress: TAddress; function GetCategory: TCategory; function GetCity: string; function GetMainPhoneNumber: string; function GetName: string; function GetPhoneCount: Integer; function GetPhones(Index: Integer): TPhone; procedure SetAddress(Value: TAddress); procedure SetCategory(Value: TCategory); procedure SetCity(const Value: string); procedure SetMainPhoneNumber(const Value: string); procedure SetName(const Value: string); procedure SetPhones(Index: Integer; Value: TPhone); protected procedure AfterCreate; override; procedure BeforeStore; override; function GetCaption: string; override; public function AddPhone(Phone: TPhone): Integer; procedure ClearPhones; procedure DeletePhone(Index: Integer); function IndexOfPhone(Phone: TPhone): Integer; procedure InsertPhone(Index: Integer; Phone: TPhone); function RemovePhone(Phone: TPhone): Integer; property PhoneCount: Integer read GetPhoneCount; property Phones[Index: Integer]: TPhone read GetPhones write SetPhones; published property Address: TAddress read GetAddress write SetAddress; property Category: TCategory read GetCategory write SetCategory; property City: string read GetCity write SetCity; property MainPhoneNumber: string read GetMainPhoneNumber write SetMainPhoneNumber; property Name: string read GetName write SetName; end; TContactFilter = class(TContact) private FIsDynamic: Boolean; function GetIsEmpty: Boolean; public function Matches(Contact: TContact): Boolean; published property IsDynamic: Boolean read FIsDynamic write FIsDynamic; property IsEmpty: Boolean read GetIsEmpty; end; TPerson = class(TContact) { IOMETADATA stored; BirthDate: DateTime; Emails: Parts(TEmail) externalstored 'Person_Email'; Employer: Reference(TCompany); Picture: Blob; Salary: Currency; } _BirthDate: TInstantDateTime; _Emails: TInstantParts; _Employer: TInstantReference; _Picture: TInstantGraphic; _Salary: TInstantCurrency; private function GetBirthDate: TDateTime; function GetEmailCount: Integer; function GetEmails(Index: Integer): TEmail; function GetEmployer: TCompany; function GetMainEmailAddress: string; function GetPicture: string; function GetSalary: Currency; procedure SetBirthDate(Value: TDateTime); procedure SetEmails(Index: Integer; Value: TEmail); procedure SetMainEmailAddress(const Value: string); procedure SetPicture(const Value: string); procedure SetSalary(Value: Currency); protected procedure BeforeDispose; override; public function AddEmail(Email: TEmail): Integer; procedure ClearEmails; procedure DeleteEmail(Index: Integer); procedure EmployBy(NewEmployer: TCompany); function IndexOfEmail(Email: TEmail): Integer; procedure InsertEmail(Index: Integer; Email: TEmail); function RemoveEmail(Email: TEmail): Integer; property EmailCount: Integer read GetEmailCount; property Emails[Index: Integer]: TEmail read GetEmails write SetEmails; published property BirthDate: TDateTime read GetBirthDate write SetBirthDate; property Employer: TCompany read GetEmployer; property MainEmailAddress: string read GetMainEmailAddress write SetMainEmailAddress; property Picture: string read GetPicture write SetPicture; property Salary: Currency read GetSalary write SetSalary; end; TCompany = class(TContact) { IOMETADATA stored; Employees: References(TPerson) externalstored 'Company_Employee'; } _Employees: TInstantReferences; private function GetEmployeeCount: Integer; function GetEmployees(Index: Integer): TPerson; public function AddEmployee(Employee: TPerson): Integer; procedure ClearEmployees; procedure DeleteEmployee(Index: Integer); function IndexOfEmployee(Employee: TPerson): Integer; procedure InsertEmployee(Index: Integer; Employee: TPerson); function RemoveEmployee(Employee: TPerson): Integer; property EmployeeCount: Integer read GetEmployeeCount; property Employees[Index: Integer]: TPerson read GetEmployees; end; implementation uses SysUtils, InstantUtils; { TAddress } function TAddress.GetCity: string; begin Result := _City.Value; end; function TAddress.GetCountry: TCountry; begin Result := _Country.Value as TCountry; end; function TAddress.GetState: string; begin Result := _State.Value; end; function TAddress.GetStreet: string; begin Result := _Street.Value; end; function TAddress.GetZip: string; begin Result := _Zip.Value; end; procedure TAddress.SetCity(const Value: string); begin _City.Value := Value; end; procedure TAddress.SetCountry(Value: TCountry); begin _Country.Value := Value; end; procedure TAddress.SetState(const Value: string); begin _State.Value := Value; end; procedure TAddress.SetStreet(const Value: string); begin _Street.Value := Value; end; procedure TAddress.SetZip(const Value: string); begin _Zip.Value := Value; end; { TCountry } procedure TCountry.BeforeStore; begin if Id = '' then raise Exception.Create('Country ID missing'); inherited; end; function TCountry.GetCaption: string; begin Result := Name; end; function TCountry.GetName: string; begin Result := _Name.Value; end; procedure TCountry.SetName(const Value: string); begin _Name.Value := Value; end; { TPerson } function TPerson.AddEmail(Email: TEmail): Integer; begin Result := _Emails.Add(Email); end; procedure TPerson.BeforeDispose; begin inherited; EmployBy(nil); end; procedure TPerson.ClearEmails; begin _Emails.Clear; end; procedure TPerson.DeleteEmail(Index: Integer); begin _Emails.Delete(Index); end; procedure TPerson.EmployBy(NewEmployer: TCompany); procedure AddToEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.AddEmployee(Self); end; procedure RemoveFromEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.RemoveEmployee(Self); end; procedure StoreEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.Store; end; var OldEmployer: TCompany; begin OldEmployer := Employer; AddRef; try Connector.StartTransaction; try AddToEmployer(NewEmployer); try StoreEmployer(NewEmployer); RemoveFromEmployer(OldEmployer); try StoreEmployer(OldEmployer); _Employer.Value := NewEmployer; try Store; Connector.CommitTransaction; except _Employer.Value := OldEmployer; raise; end; except AddToEmployer(OldEmployer); raise; end; except RemoveFromEmployer(NewEmployer); raise; end; except Connector.RollbackTransaction; raise; end; finally Free; end; end; function TPerson.GetBirthDate: TDateTime; begin Result := _BirthDate.Value; end; function TPerson.GetEmailCount: Integer; begin Result := _Emails.Count end; function TPerson.GetEmails(Index: Integer): TEmail; begin Result := _Emails[Index] as TEmail; end; function TPerson.GetEmployer: TCompany; begin Result := _Employer.Value as TCompany; end; function TPerson.GetMainEmailAddress: string; begin if EmailCount > 0 then Result := Emails[0].Address else Result := ''; end; function TPerson.GetPicture: string; begin Result := _Picture.Value; end; function TPerson.GetSalary: Currency; begin Result := _Salary.Value; end; function TPerson.IndexOfEmail(Email: TEmail): Integer; begin Result := _Emails.IndexOf(Email); end; procedure TPerson.InsertEmail(Index: Integer; Email: TEmail); begin _Emails.Insert(Index, Email); end; function TPerson.RemoveEmail(Email: TEmail): Integer; begin Result := _Emails.Remove(Email); end; procedure TPerson.SetBirthDate(Value: TDateTime); begin _BirthDate.Value := Value; end; procedure TPerson.SetEmails(Index: Integer; Value: TEmail); begin _Emails[Index] := Value; end; procedure TPerson.SetMainEmailAddress(const Value: string); var Email: TEmail; begin if Value <> MainEmailAddress then begin if EmailCount = 0 then begin Email := TEmail.Create; AddEmail(Email); end else Email := Emails[0]; Email.Address := Value; end; end; procedure TPerson.SetPicture(const Value: string); begin _Picture.Value := Value; end; { TPhone } procedure TPerson.SetSalary(Value: Currency); begin _Salary.Value := Value; end; function TPhone.GetName: string; begin Result := _Name.Value; end; function TPhone.GetNumber: string; begin Result := _Number.Value; end; procedure TPhone.SetName(const Value: string); begin _Name.Value := Value; end; procedure TPhone.SetNumber(const Value: string); begin _Number.Value := Value; end; { TEmail } function TEmail.GetAddress: string; begin Result := _Address.Value; end; procedure TEmail.SetAddress(const Value: string); begin _Address.Value := Value; end; { TCategory } function TCategory.GetCaption: string; begin Result := Name; end; function TCategory.GetName: string; begin Result := _Name.Value; end; procedure TCategory.SetName(const Value: string); begin _Name.Value := Value; end; { TContact } function TContact.AddPhone(Phone: TPhone): Integer; begin Result := _Phones.Add(Phone); end; procedure TContact.AfterCreate; begin inherited; Id := InstantGenerateId; _Category.ReferenceObject(TCategory, 'CAT000'); end; procedure TContact.BeforeStore; begin if Name = '' then raise Exception.Create('Contact name required'); inherited; City := Address.City; end; procedure TContact.ClearPhones; begin _Phones.Clear; end; procedure TContact.DeletePhone(Index: Integer); begin _Phones.Delete(Index); end; function TContact.GetAddress: TAddress; begin Result := _Address.Value as TAddress; end; function TContact.GetCaption: string; begin Result := Name; end; function TContact.GetCategory: TCategory; begin Result := _Category.Value as TCategory; end; function TContact.GetCity: string; begin Result := _City.Value; end; function TContact.GetMainPhoneNumber: string; begin if PhoneCount > 0 then Result := Phones[0].Number else Result := ''; end; function TContact.GetName: string; begin Result := _Name.Value; end; function TContact.GetPhoneCount: Integer; begin Result := _Phones.Count end; function TContact.GetPhones(Index: Integer): TPhone; begin Result := _Phones[Index] as TPhone; end; function TContact.IndexOfPhone(Phone: TPhone): Integer; begin Result := _Phones.IndexOf(Phone); end; procedure TContact.InsertPhone(Index: Integer; Phone: TPhone); begin _Phones.Insert(Index, Phone); end; function TContact.RemovePhone(Phone: TPhone): Integer; begin Result := _Phones.Remove(Phone); end; procedure TContact.SetAddress(Value: TAddress); begin _Address.Value := Value; end; procedure TContact.SetCategory(Value: TCategory); begin _Category.Value := Value; end; procedure TContact.SetCity(const Value: string); begin _City.Value := Value; end; procedure TContact.SetMainPhoneNumber(const Value: string); var Phone: TPhone; begin if Value <> MainPhoneNumber then begin if PhoneCount = 0 then begin Phone := TPhone.Create; AddPhone(Phone); Phone.Name := 'Main'; end else Phone := Phones[0]; Phone.Number := Value; end; end; procedure TContact.SetName(const Value: string); begin _Name.Value := Value; end; procedure TContact.SetPhones(Index: Integer; Value: TPhone); begin _Phones[Index] := Value; end; { TContactFilter } function TContactFilter.GetIsEmpty: Boolean; begin Result := (Name = '') and (Address.Street = '') and (Address.City = '') and (Address.Zip = '') and (Address.State = '') and (Address.Country = nil) and (Category = nil); end; function TContactFilter.Matches(Contact: TContact): Boolean; function MatchStr(const Str1, Str2: string): Boolean; begin Result := (Str1 = '') or (Pos(UpperCase(Str1), UpperCase(Str2)) > 0); end; function MatchObj(Obj1, Obj2: TObject): Boolean; begin Result := not Assigned(Obj1) or (Obj1 = Obj2); end; begin Result := Assigned(Contact) and MatchStr(Name, Contact.Name) and MatchStr(Address.Street, Contact.Address.Street) and MatchStr(Address.City, Contact.Address.City) and MatchStr(Address.Zip, Contact.Address.Zip) and MatchStr(Address.State, Contact.Address.State) and MatchObj(Address.Country, Contact.Address.Country) and MatchObj(Category, Contact.Category); end; { TCompany } function TCompany.AddEmployee(Employee: TPerson): Integer; begin Result := _Employees.Add(Employee) end; procedure TCompany.ClearEmployees; begin _Employees.Clear; end; procedure TCompany.DeleteEmployee(Index: Integer); begin _Employees.Delete(Index); end; function TCompany.GetEmployeeCount: Integer; begin Result := _Employees.Count end; function TCompany.GetEmployees(Index: Integer): TPerson; begin Result := _Employees[Index] as TPerson; end; function TCompany.IndexOfEmployee(Employee: TPerson): Integer; begin Result := _Employees.IndexOf(Employee); end; procedure TCompany.InsertEmployee(Index: Integer; Employee: TPerson); begin _Employees.Insert(Index, Employee); end; function TCompany.RemoveEmployee(Employee: TPerson): Integer; begin Result := _Employees.Remove(Employee); end; initialization InstantRegisterClasses([ TAddress, TCategory, TCompany, TContact, TContactFilter, TCountry, TEmail, TPerson, TPhone ]); end. |
From: Carlo B. <car...@us...> - 2004-12-07 08:45:45
|
Update of /cvsroot/instantobjects/Demos/PrimerCross/Model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4987/Demos/PrimerCross/Model Added Files: Model.pas Log Message: PrimerCross Demo with internal and external storage of Part and Parts: internal Model.pas is now located in Model forlder; external Model.pas is now located in ExternalModel forlder --- NEW FILE: Model.pas --- (* * PrimerCross demo: * Model.pas with "internal storage" of Part and Parts * *) unit Model; interface uses InstantPersistence; type TAddress = class; TCategory = class; TCompany = class; TContact = class; TContactFilter = class; TCountry = class; TEmail = class; TPerson = class; TPhone = class; TAddress = class(TInstantObject) { IOMETADATA City: String(30) index; Country: Reference(TCountry); State: String(4); Street: Memo; Zip: String(10); } _City: TInstantString; _Country: TInstantReference; _State: TInstantString; _Street: TInstantMemo; _Zip: TInstantString; private function GetCity: string; function GetCountry: TCountry; function GetState: string; function GetStreet: string; function GetZip: string; procedure SetCity(const Value: string); procedure SetCountry(Value: TCountry); procedure SetState(const Value: string); procedure SetStreet(const Value: string); procedure SetZip(const Value: string); published property City: string read GetCity write SetCity; property Country: TCountry read GetCountry write SetCountry; property State: string read GetState write SetState; property Street: string read GetStreet write SetStreet; property Zip: string read GetZip write SetZip; end; TCountry = class(TInstantObject) { IOMETADATA stored; Name: String(30); } _Name: TInstantString; private function GetName: string; procedure SetName(const Value: string); protected procedure BeforeStore; override; function GetCaption: string; override; published property Id; property Name: string read GetName write SetName; end; TPhone = class(TInstantObject) { IOMETADATA Name: String(20); Number: String(20) mask '(000) 000-0000;0;_'; } _Name: TInstantString; _Number: TInstantString; private function GetName: string; function GetNumber: string; procedure SetName(const Value: string); procedure SetNumber(const Value: string); published property Name: string read GetName write SetName; property Number: string read GetNumber write SetNumber; end; TEmail = class(TInstantObject) { IOMETADATA Address: String(100); } _Address: TInstantString; private function GetAddress: string; procedure SetAddress(const Value: string); published property Address: string read GetAddress write SetAddress; end; TCategory = class(TInstantObject) { IOMETADATA stored; Name: String(30); } _Name: TInstantString; private function GetName: string; procedure SetName(const Value: string); protected function GetCaption: string; override; published property Name: string read GetName write SetName; end; TContact = class(TInstantObject) { IOMETADATA stored; Address: Part(TAddress); Category: Reference(TCategory); City: String(30) index; Name: String(50) index; Phones: Parts(TPhone); } _Address: TInstantPart; _Category: TInstantReference; _City: TInstantString; _Name: TInstantString; _Phones: TInstantParts; private function GetAddress: TAddress; function GetCategory: TCategory; function GetCity: string; function GetMainPhoneNumber: string; function GetName: string; function GetPhoneCount: Integer; function GetPhones(Index: Integer): TPhone; procedure SetAddress(Value: TAddress); procedure SetCategory(Value: TCategory); procedure SetCity(const Value: string); procedure SetMainPhoneNumber(const Value: string); procedure SetName(const Value: string); procedure SetPhones(Index: Integer; Value: TPhone); protected procedure AfterCreate; override; procedure BeforeStore; override; function GetCaption: string; override; public function AddPhone(Phone: TPhone): Integer; procedure ClearPhones; procedure DeletePhone(Index: Integer); function IndexOfPhone(Phone: TPhone): Integer; procedure InsertPhone(Index: Integer; Phone: TPhone); function RemovePhone(Phone: TPhone): Integer; property PhoneCount: Integer read GetPhoneCount; property Phones[Index: Integer]: TPhone read GetPhones write SetPhones; published property Address: TAddress read GetAddress write SetAddress; property Category: TCategory read GetCategory write SetCategory; property City: string read GetCity write SetCity; property MainPhoneNumber: string read GetMainPhoneNumber write SetMainPhoneNumber; property Name: string read GetName write SetName; end; TContactFilter = class(TContact) private FIsDynamic: Boolean; function GetIsEmpty: Boolean; public function Matches(Contact: TContact): Boolean; published property IsDynamic: Boolean read FIsDynamic write FIsDynamic; property IsEmpty: Boolean read GetIsEmpty; end; TPerson = class(TContact) { IOMETADATA stored; BirthDate: DateTime; Emails: Parts(TEmail); Employer: Reference(TCompany); Picture: Blob; Salary: Currency; } _BirthDate: TInstantDateTime; _Emails: TInstantParts; _Employer: TInstantReference; _Picture: TInstantGraphic; _Salary: TInstantCurrency; private function GetBirthDate: TDateTime; function GetEmailCount: Integer; function GetEmails(Index: Integer): TEmail; function GetEmployer: TCompany; function GetMainEmailAddress: string; function GetPicture: string; function GetSalary: Currency; procedure SetBirthDate(Value: TDateTime); procedure SetEmails(Index: Integer; Value: TEmail); procedure SetMainEmailAddress(const Value: string); procedure SetPicture(const Value: string); procedure SetSalary(Value: Currency); protected procedure BeforeDispose; override; public function AddEmail(Email: TEmail): Integer; procedure ClearEmails; procedure DeleteEmail(Index: Integer); procedure EmployBy(NewEmployer: TCompany); function IndexOfEmail(Email: TEmail): Integer; procedure InsertEmail(Index: Integer; Email: TEmail); function RemoveEmail(Email: TEmail): Integer; property EmailCount: Integer read GetEmailCount; property Emails[Index: Integer]: TEmail read GetEmails write SetEmails; published property BirthDate: TDateTime read GetBirthDate write SetBirthDate; property Employer: TCompany read GetEmployer; property MainEmailAddress: string read GetMainEmailAddress write SetMainEmailAddress; property Picture: string read GetPicture write SetPicture; property Salary: Currency read GetSalary write SetSalary; end; TCompany = class(TContact) { IOMETADATA stored; Employees: References(TPerson); } _Employees: TInstantReferences; private function GetEmployeeCount: Integer; function GetEmployees(Index: Integer): TPerson; public function AddEmployee(Employee: TPerson): Integer; procedure ClearEmployees; procedure DeleteEmployee(Index: Integer); function IndexOfEmployee(Employee: TPerson): Integer; procedure InsertEmployee(Index: Integer; Employee: TPerson); function RemoveEmployee(Employee: TPerson): Integer; property EmployeeCount: Integer read GetEmployeeCount; property Employees[Index: Integer]: TPerson read GetEmployees; end; implementation uses SysUtils, InstantUtils; { TAddress } function TAddress.GetCity: string; begin Result := _City.Value; end; function TAddress.GetCountry: TCountry; begin Result := _Country.Value as TCountry; end; function TAddress.GetState: string; begin Result := _State.Value; end; function TAddress.GetStreet: string; begin Result := _Street.Value; end; function TAddress.GetZip: string; begin Result := _Zip.Value; end; procedure TAddress.SetCity(const Value: string); begin _City.Value := Value; end; procedure TAddress.SetCountry(Value: TCountry); begin _Country.Value := Value; end; procedure TAddress.SetState(const Value: string); begin _State.Value := Value; end; procedure TAddress.SetStreet(const Value: string); begin _Street.Value := Value; end; procedure TAddress.SetZip(const Value: string); begin _Zip.Value := Value; end; { TCountry } procedure TCountry.BeforeStore; begin if Id = '' then raise Exception.Create('Country ID missing'); inherited; end; function TCountry.GetCaption: string; begin Result := Name; end; function TCountry.GetName: string; begin Result := _Name.Value; end; procedure TCountry.SetName(const Value: string); begin _Name.Value := Value; end; { TPerson } function TPerson.AddEmail(Email: TEmail): Integer; begin Result := _Emails.Add(Email); end; procedure TPerson.BeforeDispose; begin inherited; EmployBy(nil); end; procedure TPerson.ClearEmails; begin _Emails.Clear; end; procedure TPerson.DeleteEmail(Index: Integer); begin _Emails.Delete(Index); end; procedure TPerson.EmployBy(NewEmployer: TCompany); procedure AddToEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.AddEmployee(Self); end; procedure RemoveFromEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.RemoveEmployee(Self); end; procedure StoreEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.Store; end; var OldEmployer: TCompany; begin OldEmployer := Employer; AddRef; try Connector.StartTransaction; try AddToEmployer(NewEmployer); try StoreEmployer(NewEmployer); RemoveFromEmployer(OldEmployer); try StoreEmployer(OldEmployer); _Employer.Value := NewEmployer; try Store; Connector.CommitTransaction; except _Employer.Value := OldEmployer; raise; end; except AddToEmployer(OldEmployer); raise; end; except RemoveFromEmployer(NewEmployer); raise; end; except Connector.RollbackTransaction; raise; end; finally Free; end; end; function TPerson.GetBirthDate: TDateTime; begin Result := _BirthDate.Value; end; function TPerson.GetEmailCount: Integer; begin Result := _Emails.Count end; function TPerson.GetEmails(Index: Integer): TEmail; begin Result := _Emails[Index] as TEmail; end; function TPerson.GetEmployer: TCompany; begin Result := _Employer.Value as TCompany; end; function TPerson.GetMainEmailAddress: string; begin if EmailCount > 0 then Result := Emails[0].Address else Result := ''; end; function TPerson.GetPicture: string; begin Result := _Picture.Value; end; function TPerson.GetSalary: Currency; begin Result := _Salary.Value; end; function TPerson.IndexOfEmail(Email: TEmail): Integer; begin Result := _Emails.IndexOf(Email); end; procedure TPerson.InsertEmail(Index: Integer; Email: TEmail); begin _Emails.Insert(Index, Email); end; function TPerson.RemoveEmail(Email: TEmail): Integer; begin Result := _Emails.Remove(Email); end; procedure TPerson.SetBirthDate(Value: TDateTime); begin _BirthDate.Value := Value; end; procedure TPerson.SetEmails(Index: Integer; Value: TEmail); begin _Emails[Index] := Value; end; procedure TPerson.SetMainEmailAddress(const Value: string); var Email: TEmail; begin if Value <> MainEmailAddress then begin if EmailCount = 0 then begin Email := TEmail.Create; AddEmail(Email); end else Email := Emails[0]; Email.Address := Value; end; end; procedure TPerson.SetPicture(const Value: string); begin _Picture.Value := Value; end; { TPhone } procedure TPerson.SetSalary(Value: Currency); begin _Salary.Value := Value; end; function TPhone.GetName: string; begin Result := _Name.Value; end; function TPhone.GetNumber: string; begin Result := _Number.Value; end; procedure TPhone.SetName(const Value: string); begin _Name.Value := Value; end; procedure TPhone.SetNumber(const Value: string); begin _Number.Value := Value; end; { TEmail } function TEmail.GetAddress: string; begin Result := _Address.Value; end; procedure TEmail.SetAddress(const Value: string); begin _Address.Value := Value; end; { TCategory } function TCategory.GetCaption: string; begin Result := Name; end; function TCategory.GetName: string; begin Result := _Name.Value; end; procedure TCategory.SetName(const Value: string); begin _Name.Value := Value; end; { TContact } function TContact.AddPhone(Phone: TPhone): Integer; begin Result := _Phones.Add(Phone); end; procedure TContact.AfterCreate; begin inherited; Id := InstantGenerateId; _Category.ReferenceObject(TCategory, 'CAT000'); end; procedure TContact.BeforeStore; begin if Name = '' then raise Exception.Create('Contact name required'); inherited; City := Address.City; end; procedure TContact.ClearPhones; begin _Phones.Clear; end; procedure TContact.DeletePhone(Index: Integer); begin _Phones.Delete(Index); end; function TContact.GetAddress: TAddress; begin Result := _Address.Value as TAddress; end; function TContact.GetCaption: string; begin Result := Name; end; function TContact.GetCategory: TCategory; begin Result := _Category.Value as TCategory; end; function TContact.GetCity: string; begin Result := _City.Value; end; function TContact.GetMainPhoneNumber: string; begin if PhoneCount > 0 then Result := Phones[0].Number else Result := ''; end; function TContact.GetName: string; begin Result := _Name.Value; end; function TContact.GetPhoneCount: Integer; begin Result := _Phones.Count end; function TContact.GetPhones(Index: Integer): TPhone; begin Result := _Phones[Index] as TPhone; end; function TContact.IndexOfPhone(Phone: TPhone): Integer; begin Result := _Phones.IndexOf(Phone); end; procedure TContact.InsertPhone(Index: Integer; Phone: TPhone); begin _Phones.Insert(Index, Phone); end; function TContact.RemovePhone(Phone: TPhone): Integer; begin Result := _Phones.Remove(Phone); end; procedure TContact.SetAddress(Value: TAddress); begin _Address.Value := Value; end; procedure TContact.SetCategory(Value: TCategory); begin _Category.Value := Value; end; procedure TContact.SetCity(const Value: string); begin _City.Value := Value; end; procedure TContact.SetMainPhoneNumber(const Value: string); var Phone: TPhone; begin if Value <> MainPhoneNumber then begin if PhoneCount = 0 then begin Phone := TPhone.Create; AddPhone(Phone); Phone.Name := 'Main'; end else Phone := Phones[0]; Phone.Number := Value; end; end; procedure TContact.SetName(const Value: string); begin _Name.Value := Value; end; procedure TContact.SetPhones(Index: Integer; Value: TPhone); begin _Phones[Index] := Value; end; { TContactFilter } function TContactFilter.GetIsEmpty: Boolean; begin Result := (Name = '') and (Address.Street = '') and (Address.City = '') and (Address.Zip = '') and (Address.State = '') and (Address.Country = nil) and (Category = nil); end; function TContactFilter.Matches(Contact: TContact): Boolean; function MatchStr(const Str1, Str2: string): Boolean; begin Result := (Str1 = '') or (Pos(UpperCase(Str1), UpperCase(Str2)) > 0); end; function MatchObj(Obj1, Obj2: TObject): Boolean; begin Result := not Assigned(Obj1) or (Obj1 = Obj2); end; begin Result := Assigned(Contact) and MatchStr(Name, Contact.Name) and MatchStr(Address.Street, Contact.Address.Street) and MatchStr(Address.City, Contact.Address.City) and MatchStr(Address.Zip, Contact.Address.Zip) and MatchStr(Address.State, Contact.Address.State) and MatchObj(Address.Country, Contact.Address.Country) and MatchObj(Category, Contact.Category); end; { TCompany } function TCompany.AddEmployee(Employee: TPerson): Integer; begin Result := _Employees.Add(Employee) end; procedure TCompany.ClearEmployees; begin _Employees.Clear; end; procedure TCompany.DeleteEmployee(Index: Integer); begin _Employees.Delete(Index); end; function TCompany.GetEmployeeCount: Integer; begin Result := _Employees.Count end; function TCompany.GetEmployees(Index: Integer): TPerson; begin Result := _Employees[Index] as TPerson; end; function TCompany.IndexOfEmployee(Employee: TPerson): Integer; begin Result := _Employees.IndexOf(Employee); end; procedure TCompany.InsertEmployee(Index: Integer; Employee: TPerson); begin _Employees.Insert(Index, Employee); end; function TCompany.RemoveEmployee(Employee: TPerson): Integer; begin Result := _Employees.Remove(Employee); end; initialization InstantRegisterClasses([ TAddress, TCategory, TCompany, TContact, TContactFilter, TCountry, TEmail, TPerson, TPhone ]); end. |
From: Carlo B. <car...@us...> - 2004-12-07 08:41:47
|
Update of /cvsroot/instantobjects/Demos/PrimerCross/ModelExternal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4272/ModelExternal Log Message: Directory /cvsroot/instantobjects/Demos/PrimerCross/ModelExternal added to the repository |
From: Carlo B. <car...@us...> - 2004-12-07 08:41:17
|
Update of /cvsroot/instantobjects/Demos/PrimerCross/Model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4183/Model Log Message: Directory /cvsroot/instantobjects/Demos/PrimerCross/Model added to the repository |
From: Carlo B. <car...@us...> - 2004-12-06 08:51:33
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19834/Source/Brokers/UIB Modified Files: InstantUIBConnection.pas Log Message: published OnLogin event of UIBConnector Index: InstantUIBConnection.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIBConnection.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InstantUIBConnection.pas 3 Dec 2004 16:04:29 -0000 1.2 --- InstantUIBConnection.pas 6 Dec 2004 08:51:23 -0000 1.3 *************** *** 50,53 **** --- 50,54 ---- published property Database: TJvUIBDataBase read FDatabase; + property OnLogin; end; *************** *** 91,95 **** function TInstantUIBConnection.Login: Boolean; var ! Username, Password, OldPassword: String; begin Username := FDatabase.UserName; --- 92,96 ---- function TInstantUIBConnection.Login: Boolean; var ! Username, Password: String; begin Username := FDatabase.UserName; |
From: Carlo B. <car...@us...> - 2004-12-06 08:51:32
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19834/Source/Brokers/UIB/D7 Modified Files: DclIOUIB.dof Log Message: published OnLogin event of UIBConnector Index: DclIOUIB.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/DclIOUIB.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOUIB.dof 11 Oct 2004 08:15:09 -0000 1.1 --- DclIOUIB.dof 6 Dec 2004 08:51:23 -0000 1.2 *************** *** 1,5 **** [FileVersion] Version=7.0 - [Compiler] A=8 --- 1,4 ---- *************** *** 81,85 **** UnsafeCode=1 UnsafeCast=1 - [Linker] MapFile=0 --- 80,83 ---- *************** *** 92,96 **** ImageBase=4194304 ExeDescription=InstantObjects UIB Design-Time Support (Delphi 7) - [Directories] OutputDir= --- 90,93 ---- *************** *** 103,107 **** DebugSourceDirs= UsePackages=0 - [Parameters] RunParams= --- 100,103 ---- *************** *** 110,119 **** UseLauncher=0 DebugCWD= - [Language] ActiveLang= ProjectLang= RootDir=C:\Work\DelphiComps\D7\IO16\Source\Brokers\IBX\ - [Version Info] IncludeVerInfo=1 --- 106,113 ---- *************** *** 130,134 **** Locale=1040 CodePage=1252 - [Version Info Keys] CompanyName=InstantObjects.org --- 124,127 ---- *************** *** 141,342 **** ProductName=InstantObjects ProductVersion=1.7 - - [Exception Log] - EurekaLog Version=454 - Activate=0 - Activate Handle=1 - Save Log File=1 - Foreground Tab=0 - EurekaLogLook=1 - Freeze Activate=0 - Freeze Timeout=60 - Freeze Message=The application seems to be frozen. - SMTP From=eur...@em... - SMTP Host= - SMTP Port=25 - SMTP UserID= - SMTP Password= - SMTP ShowDialog=1 - ShowExceptionDialog=1 - Append to Log=0 - Send Entire Log=0 - Attach Screenshot=0 - Show TerminateBtn=1 - TerminateBtn Operation=1 - Errors Number=32 - Errors Terminate=3 - Email Address= - Email Object= - Email Send Options=0 - Output Path= - Count=0 - EMail Message Line Count=0 - loNoDuplicateErrors=0 - loAppendReproduceText=0 - AppStartDate=1 - AppName=1 - AppVersionNumber=1 - AppParameters=1 - ExcDate=1 - ExcAddress=1 - ExcModule=1 - ExcType=1 - ExcMessage=1 - ActCtlsFormClass=1 - ActCtlsFormText=1 - ActCtlsControlClass=1 - ActCtlsControlText=1 - CmpName=1 - CmpUser=1 - CmpTotalMemory=1 - CmpFreeMemory=1 - CmpTotalDisk=1 - CmpFreeDisk=1 - OSType=1 - OSBuildN=1 - OSUpdate=1 - OSLanguage=1 - Count mtInformationMsgCaption=1 - mtInformationMsgCaption0=Information. - Count mtQuestionMsgCaption=1 - mtQuestionMsgCaption0=Question. - Count mtDialog_Caption=1 - mtDialog_Caption0=Error. - Count mtDialog_ErrorMsgCaption=2 - mtDialog_ErrorMsgCaption0=An error has occurred during program execution. - mtDialog_ErrorMsgCaption1=Please read the following information for further details. - Count mtDialog_GeneralCaption=1 - mtDialog_GeneralCaption0=General - Count mtDialog_GeneralHeader=1 - mtDialog_GeneralHeader0=General Information - Count mtDialog_CallStackCaption=1 - mtDialog_CallStackCaption0=Call Stack - Count mtDialog_CallStackHeader=1 - mtDialog_CallStackHeader0=Call Stack Information - Count mtDialog_ModulesCaption=1 - mtDialog_ModulesCaption0=Modules - Count mtDialog_ModulesHeader=1 - mtDialog_ModulesHeader0=Modules Information - Count mtDialog_CPUCaption=1 - mtDialog_CPUCaption0=CPU - Count mtDialog_CPUHeader=1 - mtDialog_CPUHeader0=CPU Information - Count mtDialog_OKButtonCaption=1 - mtDialog_OKButtonCaption0=&OK - Count mtDialog_TerminateButtonCaption=1 - mtDialog_TerminateButtonCaption0=&Terminate - Count mtDialog_RestartButtonCaption=1 - mtDialog_RestartButtonCaption0=&Restart - Count mtDialog_DetailsButtonCaption=1 - mtDialog_DetailsButtonCaption0=&Details - Count mtDialog_EmailMessage=1 - mtDialog_EmailMessage0=&Send this error via Email - Count mtDialog_ScreenshotMessage=1 - mtDialog_ScreenshotMessage0=&Attach a Screenshot image - Count mtDialog_CopyMessage=1 - mtDialog_CopyMessage0=&Copy to Clipboard - Count mtLog_AppHeader=1 - mtLog_AppHeader0=Application - Count mtLog_AppStartDate=1 - mtLog_AppStartDate0=Start Date - Count mtLog_AppName=1 - mtLog_AppName0=Name/Description - Count mtLog_AppVersionNumber=1 - mtLog_AppVersionNumber0=Version Number - Count mtLog_AppParameters=1 - mtLog_AppParameters0=Parameters - Count mtLog_ExcHeader=1 - mtLog_ExcHeader0=Exception - Count mtLog_ExcDate=1 - mtLog_ExcDate0=Date - Count mtLog_ExcAddress=1 - mtLog_ExcAddress0=Address - Count mtLog_ExcModule=1 - mtLog_ExcModule0=Module - Count mtLog_ExcType=1 - mtLog_ExcType0=Type - Count mtLog_ExcMessage=1 - mtLog_ExcMessage0=Message - Count mtLog_ActCtrlsHeader=1 - mtLog_ActCtrlsHeader0=Active Controls - Count mtLog_ActCtrlsFormClass=1 - mtLog_ActCtrlsFormClass0=Form Class - Count mtLog_ActCtrlsFormText=1 - mtLog_ActCtrlsFormText0=Form Text - Count mtLog_ActCtrlsControlClass=1 - mtLog_ActCtrlsControlClass0=Control Class - Count mtLog_ActCtrlsControlText=1 - mtLog_ActCtrlsControlText0=Control Text - Count mtLog_CmpHeader=1 - mtLog_CmpHeader0=Computer - Count mtLog_CmpName=1 - mtLog_CmpName0=Name - Count mtLog_CmpUser=1 - mtLog_CmpUser0=User - Count mtLog_CmpTotalMemory=1 - mtLog_CmpTotalMemory0=Total Memory - Count mtLog_CmpFreeMemory=1 - mtLog_CmpFreeMemory0=Free Memory - Count mtLog_CmpTotalDisk=1 - mtLog_CmpTotalDisk0=Total Disk - Count mtLog_CmpFreeDisk=1 - mtLog_CmpFreeDisk0=Free Disk - Count mtLog_OSHeader=1 - mtLog_OSHeader0=Operating System - Count mtLog_OSType=1 - mtLog_OSType0=Type - Count mtLog_OSBuildN=1 - mtLog_OSBuildN0=Build # - Count mtLog_OSUpdate=1 - mtLog_OSUpdate0=Update - Count mtLog_OSLanguage=1 - mtLog_OSLanguage0=Language - Count mtCallStack_Address=1 - mtCallStack_Address0=Address - Count mtCallStack_Name=1 - mtCallStack_Name0=Module - Count mtCallStack_Unit=1 - mtCallStack_Unit0=Unit - Count mtCallStack_Class=1 - mtCallStack_Class0=Class - Count mtCallStack_Procedure=1 - mtCallStack_Procedure0=Procedure/Method - Count mtCallStack_Line=1 - mtCallStack_Line0=Line - Count mtSMTPDialog_Caption=1 - mtSMTPDialog_Caption0=SMTP. - Count mtSMTPDialog_Message=1 - mtSMTPDialog_Message0=Message - Count mtSMTPDialog_Resolving=1 - mtSMTPDialog_Resolving0=Resolving MX record... - Count mtSMTPDialog_Connecting=1 - mtSMTPDialog_Connecting0=Connecting with SMTP server... - Count mtSMTPDialog_Connected=1 - mtSMTPDialog_Connected0=Connected with SMTP server. - Count mtSMTPDialog_Sending=1 - mtSMTPDialog_Sending0=Sending message... - Count mtReproduceDialog_Caption=1 - mtReproduceDialog_Caption0=Request - Count mtReproduceDialog_Request=1 - mtReproduceDialog_Request0=Please describe the steps to reproduce the error: - Count mtReproduceDialog_OKButtonCaption=1 - mtReproduceDialog_OKButtonCaption0=&OK - Count mtModules_Handle=1 - mtModules_Handle0=Handle - Count mtModules_Name=1 - mtModules_Name0=Name - Count mtModules_Description=1 - mtModules_Description0=Description - Count mtModules_Version=1 - mtModules_Version0=Version - Count mtModules_Size=1 - mtModules_Size0=Size - Count mtModules_Path=1 - mtModules_Path0=Path - Count mtCPU_Registers=1 - mtCPU_Registers0=Registers - Count mtCPU_Stack=1 - mtCPU_Stack0=Stack - Count mtCPU_MemoryDump=1 - mtCPU_MemoryDump0=Memory Dump - --- 134,135 ---- |
Update of /cvsroot/instantobjects/Demos/PrimerCross In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19405/Demos/PrimerCross Modified Files: CompanyBrowse.pas CompanyEdit.pas ContactBrowse.pas ContactEdit.pas ContactFilterEdit.dfm ContactFilterEdit.pas ContactSort.dfm ContactSort.pas ContactView.pas CountryBrowse.pas DemoData.pas Main.pas MainData.pas PerformanceView.pas PersonBrowse.pas PersonEdit.pas Primer.dpr Added Files: ModelExternal.pas PrimerExternal.cfg PrimerExternal.dpr PrimerExternal.mdr Log Message: External support added to Primer demo: new ModelExterna.pas and PrimerCrossExternal.dpr (must be compiled with EXTERNALSTORAGE directive) Index: PerformanceView.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PerformanceView.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PerformanceView.pas 23 Aug 2004 09:55:19 -0000 1.3 --- PerformanceView.pas 6 Dec 2004 08:49:15 -0000 1.4 *************** *** 171,175 **** uses ! Model, DemoData, IniFiles, Utility; { TTestResult } --- 171,176 ---- uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! DemoData, IniFiles, Utility; { TTestResult } *************** *** 662,666 **** begin inherited; ! TInstantSQLBroker(Connector.Broker).UsePreparedQuery := PreparedQueryCheckBox.Checked; end; --- 663,668 ---- begin inherited; ! if Connector.Broker is TInstantSQLBroker then ! TInstantSQLBroker(Connector.Broker).UsePreparedQuery := PreparedQueryCheckBox.Checked; end; Index: ContactFilterEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactFilterEdit.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ContactFilterEdit.pas 20 Jul 2004 11:05:15 -0000 1.1 --- ContactFilterEdit.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 13,17 **** QStdCtrls, QGrids, QDBGrids, QMask, QDBCtrls, QExtCtrls, QComCtrls, {$ENDIF} ! ContactEdit, DB, InstantPresentation, Model; type --- 13,18 ---- QStdCtrls, QGrids, QDBGrids, QMask, QDBCtrls, QExtCtrls, QComCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactEdit, DB, InstantPresentation; type Index: ContactSort.dfm =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactSort.dfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ContactSort.dfm 20 Jul 2004 11:05:15 -0000 1.1 --- ContactSort.dfm 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 2,8 **** Left = 334 Top = 264 Caption = 'Sort' - ClientHeight = 233 - ClientWidth = 353 Color = clBtnFace Font.Charset = DEFAULT_CHARSET --- 2,8 ---- Left = 334 Top = 264 + Width = 378 + Height = 267 Caption = 'Sort' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Index: PersonBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PersonBrowse.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PersonBrowse.pas 20 Jul 2004 11:05:15 -0000 1.1 --- PersonBrowse.pas 6 Dec 2004 08:49:16 -0000 1.2 *************** *** 13,17 **** QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, QStdCtrls, {$ENDIF} ! ContactBrowse, Db, InstantPresentation, Model; type --- 13,18 ---- QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, QStdCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactBrowse, Db, InstantPresentation; type Index: ContactBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactBrowse.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ContactBrowse.pas 20 Jul 2004 11:05:15 -0000 1.1 --- ContactBrowse.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 11,17 **** {$IFDEF LINUX} QGraphics, QControls, QForms, QDialogs, QStdCtrls, ! QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, {$ENDIF} ! BasicBrowse, DB, InstantPresentation, Model, QTypes; type --- 11,18 ---- {$IFDEF LINUX} QGraphics, QControls, QForms, QDialogs, QStdCtrls, ! QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, QTypes, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! BasicBrowse, DB, InstantPresentation; type Index: CompanyEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/CompanyEdit.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CompanyEdit.pas 4 Aug 2004 22:43:38 -0000 1.3 --- CompanyEdit.pas 6 Dec 2004 08:49:15 -0000 1.4 *************** *** 14,18 **** QMask, QDBCtrls, QComCtrls, QMenus, QImgList, QActnList, QButtons, {$ENDIF} ! ContactEdit, DB, InstantPresentation, Model; type --- 14,19 ---- QMask, QDBCtrls, QComCtrls, QMenus, QImgList, QActnList, QButtons, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactEdit, DB, InstantPresentation; type Index: ContactEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactEdit.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ContactEdit.pas 20 Jul 2004 11:05:15 -0000 1.1 --- ContactEdit.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 13,17 **** QStdCtrls, QExtCtrls, QMask, QDBCtrls, QGrids, QDBGrids, QComCtrls, {$ENDIF} ! BasicEdit, Db, InstantPresentation, Model; type --- 13,18 ---- QStdCtrls, QExtCtrls, QMask, QDBCtrls, QGrids, QDBGrids, QComCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! BasicEdit, Db, InstantPresentation; type Index: ContactView.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactView.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ContactView.pas 4 Aug 2004 22:43:38 -0000 1.3 --- ContactView.pas 6 Dec 2004 08:49:15 -0000 1.4 *************** *** 21,25 **** QStdCtrls, QActnList, QImgList, QMenus, {$ENDIF} ! BasicView, Model, InstantPresentation, InstantExplorer; type --- 21,26 ---- QStdCtrls, QActnList, QImgList, QMenus, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! BasicView, InstantPresentation, InstantExplorer; type Index: CountryBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/CountryBrowse.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CountryBrowse.pas 20 Jul 2004 11:05:15 -0000 1.1 --- CountryBrowse.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 15,19 **** QComCtrls, QStdCtrls, {$ENDIF} ! InstantPresentation, Model; type --- 15,20 ---- QComCtrls, QStdCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! InstantPresentation; type Index: Primer.dpr =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Primer.dpr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Primer.dpr 29 Jul 2004 20:43:09 -0000 1.2 --- Primer.dpr 6 Dec 2004 08:49:16 -0000 1.3 *************** *** 1,5 **** (* * InstantObjects ! * Primer Demo * *) --- 1,5 ---- (* * InstantObjects ! * Primer Demo - with "internal storage" of Part and Parts * *) Index: MainData.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/MainData.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MainData.pas 20 Jul 2004 11:05:15 -0000 1.1 --- MainData.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 34,38 **** uses ! Model; {$R *.dfm} --- 34,38 ---- uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal;{$ELSE}Model;{$ENDIF} {$R *.dfm} --- NEW FILE: PrimerExternal.dpr --- (* * InstantObjects * Primer Demo - with "external storage" of Part and Parts * *) (* ***** 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: * - cross-platform porting for Delphi & Kilix * - PerformanceView form changed to make tests with UsePreparedQuery * Salary attribute of type Currency added to Person * PersonEdit form and random data form changed to test Graphic support * ***** END LICENSE BLOCK ***** *) program PrimerExternal; uses Forms, Main in 'Main.pas' {MainForm}, ModelExternal in 'ModelExternal.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} {ModelExternal} begin Application.Initialize; Application.Title := 'InstantObjects Primer (Delphi/Kylix cross platform version)'; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMainDataModule, MainDataModule); Application.Run; end. Index: Main.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/Main.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.pas 17 Nov 2004 20:59:47 -0000 1.4 --- Main.pas 6 Dec 2004 08:49:15 -0000 1.5 *************** *** 122,126 **** uses ! Contnrs, Model, Welcome, MainData, RandomData, DemoData, Utility, ContactView, PerformanceView, {$IFDEF MSWINDOWS} HelpView, JPeg, --- 122,128 ---- uses ! Contnrs, ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! Welcome, MainData, RandomData, DemoData, Utility, ContactView, PerformanceView, {$IFDEF MSWINDOWS} HelpView, JPeg, *************** *** 137,151 **** installed all brokers, please remove the missing broker unit(s) from the list. } - {$IFDEF MSWINDOWS} {$IFNDEF VER130} InstantDBX, {$ENDIF} ! InstantADO, ! InstantBDE, ! InstantIBX, {$ENDIF} {$IFDEF LINUX} ! InstantDBX, {$ENDIF} InstantXML; --- 139,150 ---- installed all brokers, please remove the missing broker unit(s) from the list. } {$IFDEF MSWINDOWS} {$IFNDEF VER130} InstantDBX, {$ENDIF} ! InstantADO, InstantBDE, InstantIBX, InstantUIB, {$ENDIF} {$IFDEF LINUX} ! InstantDBX, InstantUIB, {$ENDIF} InstantXML; Index: DemoData.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/DemoData.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DemoData.pas 29 Jul 2004 20:43:09 -0000 1.2 --- DemoData.pas 6 Dec 2004 08:49:15 -0000 1.3 *************** *** 4,8 **** uses ! Classes, Model, InstantPersistence, RandomData; procedure CreateCategories; --- 4,9 ---- uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! Classes, InstantPersistence, RandomData; procedure CreateCategories; Index: PersonEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/PersonEdit.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PersonEdit.pas 17 Nov 2004 20:59:47 -0000 1.4 --- PersonEdit.pas 6 Dec 2004 08:49:16 -0000 1.5 *************** *** 13,17 **** QGrids, QDBGrids, QMask, QDBCtrls, QComCtrls, QButtons, QImgList, {$ENDIF} ! ContactEdit, DB, InstantPresentation, Model; type --- 13,18 ---- QGrids, QDBGrids, QMask, QDBCtrls, QComCtrls, QButtons, QImgList, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactEdit, DB, InstantPresentation; type Index: ContactSort.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactSort.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ContactSort.pas 20 Jul 2004 11:05:15 -0000 1.1 --- ContactSort.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 41,45 **** uses ! Model, TypInfo, InstantRtti, InstantPresentation; {$R *.dfm} --- 41,46 ---- uses ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! TypInfo, InstantRtti, InstantPresentation; {$R *.dfm} Index: ContactFilterEdit.dfm =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/ContactFilterEdit.dfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ContactFilterEdit.dfm 20 Jul 2004 11:05:15 -0000 1.1 --- ContactFilterEdit.dfm 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 14,24 **** PixelsPerInch = 96 TextHeight = 13 - inherited ButtonPanel: TPanel - Top = 247 - end inherited ClientPanel: TPanel - Height = 247 inherited PageControl: TPageControl - Height = 243 inherited DetailsSheet: TTabSheet inherited PhonesLabel: TLabel --- 14,19 ---- *************** *** 55,59 **** Height = 80 AutoSize = False ! Caption = 'Use the fields to the left to specify values or part of values t' + 'hat must be matched for objects to be included in the view.' --- 50,54 ---- Height = 80 AutoSize = False ! Caption = 'Use the fields to the left to specify values or part of values t' + 'hat must be matched for objects to be included in the view.' *************** *** 66,70 **** Height = 70 AutoSize = False ! Caption = 'Uncheck Dynamic to apply the filter on all objects at once inste' + 'ad of dynamically when browsing.' --- 61,65 ---- Height = 70 AutoSize = False ! Caption = 'Uncheck Dynamic to apply the filter on all objects at once inste' + 'ad of dynamically when browsing.' --- NEW FILE: PrimerExternal.mdr --- (This appears to be a binary file; contents omitted.) Index: CompanyBrowse.pas =================================================================== RCS file: /cvsroot/instantobjects/Demos/PrimerCross/CompanyBrowse.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CompanyBrowse.pas 20 Jul 2004 11:05:15 -0000 1.1 --- CompanyBrowse.pas 6 Dec 2004 08:49:15 -0000 1.2 *************** *** 13,17 **** QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, {$ENDIF} ! ContactBrowse, DB, InstantPresentation, Model; type --- 13,18 ---- QMenus, QImgList, QActnList, QGrids, QDBGrids, QExtCtrls, QComCtrls, {$ENDIF} ! {$IFDEF EXTERNALSTORAGE}ModelExternal,{$ELSE}Model,{$ENDIF} ! ContactBrowse, DB, InstantPresentation; type --- NEW FILE: PrimerExternal.cfg --- -$A8 -$B- -$C+ -$D+ -$E- -$F- -$G+ -$H+ -$I+ -$J+ -$K- -$L+ -$M- -$N+ -$O- -$P+ -$Q- -$R- -$S- -$T- -$U- -$V+ -$W+ -$X+ -$YD -$Z1 -cg -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -H+ -W+ -M -$M16384,1048576 -K$00400000 -LE"c:\programmi\borland\delphi7\Projects\Bpl" -LN"c:\programmi\borland\delphi7\Projects\Bpl" -U"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" -O"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" -I"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" -R"c:\programmi\borland\delphi7\Lib\Debug;..\..\Source\Brokers\DBX;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML" -DEXTERNALSTORAGE -w-UNIT_PLATFORM -w-UNSAFE_TYPE -w-UNSAFE_CODE -w-UNSAFE_CAST --- NEW FILE: ModelExternal.pas --- unit ModelExternal; interface uses InstantPersistence; type TAddress = class; TCategory = class; TCompany = class; TContact = class; TContactFilter = class; TCountry = class; TEmail = class; TPerson = class; TPhone = class; TAddress = class(TInstantObject) { IOMETADATA City: String(30) index; Country: Reference(TCountry); State: String(4); Street: Memo; Zip: String(10); } _City: TInstantString; _Country: TInstantReference; _State: TInstantString; _Street: TInstantMemo; _Zip: TInstantString; private function GetCity: string; function GetCountry: TCountry; function GetState: string; function GetStreet: string; function GetZip: string; procedure SetCity(const Value: string); procedure SetCountry(Value: TCountry); procedure SetState(const Value: string); procedure SetStreet(const Value: string); procedure SetZip(const Value: string); published property City: string read GetCity write SetCity; property Country: TCountry read GetCountry write SetCountry; property State: string read GetState write SetState; property Street: string read GetStreet write SetStreet; property Zip: string read GetZip write SetZip; end; TCountry = class(TInstantObject) { IOMETADATA stored; Name: String(30); } _Name: TInstantString; private function GetName: string; procedure SetName(const Value: string); protected procedure BeforeStore; override; function GetCaption: string; override; published property Id; property Name: string read GetName write SetName; end; TPhone = class(TInstantObject) { IOMETADATA Name: String(20); Number: String(20) mask '(000) 000-0000;0;_'; } _Name: TInstantString; _Number: TInstantString; private function GetName: string; function GetNumber: string; procedure SetName(const Value: string); procedure SetNumber(const Value: string); published property Name: string read GetName write SetName; property Number: string read GetNumber write SetNumber; end; TEmail = class(TInstantObject) { IOMETADATA Address: String(100); } _Address: TInstantString; private function GetAddress: string; procedure SetAddress(const Value: string); published property Address: string read GetAddress write SetAddress; end; TCategory = class(TInstantObject) { IOMETADATA stored; Name: String(30); } _Name: TInstantString; private function GetName: string; procedure SetName(const Value: string); protected function GetCaption: string; override; published property Name: string read GetName write SetName; end; TContact = class(TInstantObject) { IOMETADATA stored; Address: Part(TAddress) externalstored 'Contact_Address'; Category: Reference(TCategory); City: String(30) index; Name: String(50) index; Phones: Parts(TPhone) externalstored 'Contact_Phone'; } _Address: TInstantPart; _Category: TInstantReference; _City: TInstantString; _Name: TInstantString; _Phones: TInstantParts; private function GetAddress: TAddress; function GetCategory: TCategory; function GetCity: string; function GetMainPhoneNumber: string; function GetName: string; function GetPhoneCount: Integer; function GetPhones(Index: Integer): TPhone; procedure SetAddress(Value: TAddress); procedure SetCategory(Value: TCategory); procedure SetCity(const Value: string); procedure SetMainPhoneNumber(const Value: string); procedure SetName(const Value: string); procedure SetPhones(Index: Integer; Value: TPhone); protected procedure AfterCreate; override; procedure BeforeStore; override; function GetCaption: string; override; public function AddPhone(Phone: TPhone): Integer; procedure ClearPhones; procedure DeletePhone(Index: Integer); function IndexOfPhone(Phone: TPhone): Integer; procedure InsertPhone(Index: Integer; Phone: TPhone); function RemovePhone(Phone: TPhone): Integer; property PhoneCount: Integer read GetPhoneCount; property Phones[Index: Integer]: TPhone read GetPhones write SetPhones; published property Address: TAddress read GetAddress write SetAddress; property Category: TCategory read GetCategory write SetCategory; property City: string read GetCity write SetCity; property MainPhoneNumber: string read GetMainPhoneNumber write SetMainPhoneNumber; property Name: string read GetName write SetName; end; TContactFilter = class(TContact) private FIsDynamic: Boolean; function GetIsEmpty: Boolean; public function Matches(Contact: TContact): Boolean; published property IsDynamic: Boolean read FIsDynamic write FIsDynamic; property IsEmpty: Boolean read GetIsEmpty; end; TPerson = class(TContact) { IOMETADATA stored; BirthDate: DateTime; Emails: Parts(TEmail); Employer: Reference(TCompany); Picture: Blob; Salary: Currency; } _BirthDate: TInstantDateTime; _Emails: TInstantParts; _Employer: TInstantReference; _Picture: TInstantGraphic; _Salary: TInstantCurrency; private function GetBirthDate: TDateTime; function GetEmailCount: Integer; function GetEmails(Index: Integer): TEmail; function GetEmployer: TCompany; function GetMainEmailAddress: string; function GetPicture: string; function GetSalary: Currency; procedure SetBirthDate(Value: TDateTime); procedure SetEmails(Index: Integer; Value: TEmail); procedure SetMainEmailAddress(const Value: string); procedure SetPicture(const Value: string); procedure SetSalary(Value: Currency); protected procedure BeforeDispose; override; public function AddEmail(Email: TEmail): Integer; procedure ClearEmails; procedure DeleteEmail(Index: Integer); procedure EmployBy(NewEmployer: TCompany); function IndexOfEmail(Email: TEmail): Integer; procedure InsertEmail(Index: Integer; Email: TEmail); function RemoveEmail(Email: TEmail): Integer; property EmailCount: Integer read GetEmailCount; property Emails[Index: Integer]: TEmail read GetEmails write SetEmails; published property BirthDate: TDateTime read GetBirthDate write SetBirthDate; property Employer: TCompany read GetEmployer; property MainEmailAddress: string read GetMainEmailAddress write SetMainEmailAddress; property Picture: string read GetPicture write SetPicture; property Salary: Currency read GetSalary write SetSalary; end; TCompany = class(TContact) { IOMETADATA stored; Employees: References(TPerson) externalstored 'Company_Employee'; } _Employees: TInstantReferences; private function GetEmployeeCount: Integer; function GetEmployees(Index: Integer): TPerson; public function AddEmployee(Employee: TPerson): Integer; procedure ClearEmployees; procedure DeleteEmployee(Index: Integer); function IndexOfEmployee(Employee: TPerson): Integer; procedure InsertEmployee(Index: Integer; Employee: TPerson); function RemoveEmployee(Employee: TPerson): Integer; property EmployeeCount: Integer read GetEmployeeCount; property Employees[Index: Integer]: TPerson read GetEmployees; end; implementation uses SysUtils, InstantUtils; { TAddress } function TAddress.GetCity: string; begin Result := _City.Value; end; function TAddress.GetCountry: TCountry; begin Result := _Country.Value as TCountry; end; function TAddress.GetState: string; begin Result := _State.Value; end; function TAddress.GetStreet: string; begin Result := _Street.Value; end; function TAddress.GetZip: string; begin Result := _Zip.Value; end; procedure TAddress.SetCity(const Value: string); begin _City.Value := Value; end; procedure TAddress.SetCountry(Value: TCountry); begin _Country.Value := Value; end; procedure TAddress.SetState(const Value: string); begin _State.Value := Value; end; procedure TAddress.SetStreet(const Value: string); begin _Street.Value := Value; end; procedure TAddress.SetZip(const Value: string); begin _Zip.Value := Value; end; { TCountry } procedure TCountry.BeforeStore; begin if Id = '' then raise Exception.Create('Country ID missing'); inherited; end; function TCountry.GetCaption: string; begin Result := Name; end; function TCountry.GetName: string; begin Result := _Name.Value; end; procedure TCountry.SetName(const Value: string); begin _Name.Value := Value; end; { TPerson } function TPerson.AddEmail(Email: TEmail): Integer; begin Result := _Emails.Add(Email); end; procedure TPerson.BeforeDispose; begin inherited; EmployBy(nil); end; procedure TPerson.ClearEmails; begin _Emails.Clear; end; procedure TPerson.DeleteEmail(Index: Integer); begin _Emails.Delete(Index); end; procedure TPerson.EmployBy(NewEmployer: TCompany); procedure AddToEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.AddEmployee(Self); end; procedure RemoveFromEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.RemoveEmployee(Self); end; procedure StoreEmployer(AEmployer: TCompany); begin if Assigned(AEmployer) then AEmployer.Store; end; var OldEmployer: TCompany; begin OldEmployer := Employer; AddRef; try Connector.StartTransaction; try AddToEmployer(NewEmployer); try StoreEmployer(NewEmployer); RemoveFromEmployer(OldEmployer); try StoreEmployer(OldEmployer); _Employer.Value := NewEmployer; try Store; Connector.CommitTransaction; except _Employer.Value := OldEmployer; raise; end; except AddToEmployer(OldEmployer); raise; end; except RemoveFromEmployer(NewEmployer); raise; end; except Connector.RollbackTransaction; raise; end; finally Free; end; end; function TPerson.GetBirthDate: TDateTime; begin Result := _BirthDate.Value; end; function TPerson.GetEmailCount: Integer; begin Result := _Emails.Count end; function TPerson.GetEmails(Index: Integer): TEmail; begin Result := _Emails[Index] as TEmail; end; function TPerson.GetEmployer: TCompany; begin Result := _Employer.Value as TCompany; end; function TPerson.GetMainEmailAddress: string; begin if EmailCount > 0 then Result := Emails[0].Address else Result := ''; end; function TPerson.GetPicture: string; begin Result := _Picture.Value; end; function TPerson.GetSalary: Currency; begin Result := _Salary.Value; end; function TPerson.IndexOfEmail(Email: TEmail): Integer; begin Result := _Emails.IndexOf(Email); end; procedure TPerson.InsertEmail(Index: Integer; Email: TEmail); begin _Emails.Insert(Index, Email); end; function TPerson.RemoveEmail(Email: TEmail): Integer; begin Result := _Emails.Remove(Email); end; procedure TPerson.SetBirthDate(Value: TDateTime); begin _BirthDate.Value := Value; end; procedure TPerson.SetEmails(Index: Integer; Value: TEmail); begin _Emails[Index] := Value; end; procedure TPerson.SetMainEmailAddress(const Value: string); var Email: TEmail; begin if Value <> MainEmailAddress then begin if EmailCount = 0 then begin Email := TEmail.Create; AddEmail(Email); end else Email := Emails[0]; Email.Address := Value; end; end; procedure TPerson.SetPicture(const Value: string); begin _Picture.Value := Value; end; { TPhone } procedure TPerson.SetSalary(Value: Currency); begin _Salary.Value := Value; end; function TPhone.GetName: string; begin Result := _Name.Value; end; function TPhone.GetNumber: string; begin Result := _Number.Value; end; procedure TPhone.SetName(const Value: string); begin _Name.Value := Value; end; procedure TPhone.SetNumber(const Value: string); begin _Number.Value := Value; end; { TEmail } function TEmail.GetAddress: string; begin Result := _Address.Value; end; procedure TEmail.SetAddress(const Value: string); begin _Address.Value := Value; end; { TCategory } function TCategory.GetCaption: string; begin Result := Name; end; function TCategory.GetName: string; begin Result := _Name.Value; end; procedure TCategory.SetName(const Value: string); begin _Name.Value := Value; end; { TContact } function TContact.AddPhone(Phone: TPhone): Integer; begin Result := _Phones.Add(Phone); end; procedure TContact.AfterCreate; begin inherited; Id := InstantGenerateId; _Category.ReferenceObject(TCategory, 'CAT000'); end; procedure TContact.BeforeStore; begin if Name = '' then raise Exception.Create('Contact name required'); inherited; City := Address.City; end; procedure TContact.ClearPhones; begin _Phones.Clear; end; procedure TContact.DeletePhone(Index: Integer); begin _Phones.Delete(Index); end; function TContact.GetAddress: TAddress; begin Result := _Address.Value as TAddress; end; function TContact.GetCaption: string; begin Result := Name; end; function TContact.GetCategory: TCategory; begin Result := _Category.Value as TCategory; end; function TContact.GetCity: string; begin Result := _City.Value; end; function TContact.GetMainPhoneNumber: string; begin if PhoneCount > 0 then Result := Phones[0].Number else Result := ''; end; function TContact.GetName: string; begin Result := _Name.Value; end; function TContact.GetPhoneCount: Integer; begin Result := _Phones.Count end; function TContact.GetPhones(Index: Integer): TPhone; begin Result := _Phones[Index] as TPhone; end; function TContact.IndexOfPhone(Phone: TPhone): Integer; begin Result := _Phones.IndexOf(Phone); end; procedure TContact.InsertPhone(Index: Integer; Phone: TPhone); begin _Phones.Insert(Index, Phone); end; function TContact.RemovePhone(Phone: TPhone): Integer; begin Result := _Phones.Remove(Phone); end; procedure TContact.SetAddress(Value: TAddress); begin _Address.Value := Value; end; procedure TContact.SetCategory(Value: TCategory); begin _Category.Value := Value; end; procedure TContact.SetCity(const Value: string); begin _City.Value := Value; end; procedure TContact.SetMainPhoneNumber(const Value: string); var Phone: TPhone; begin if Value <> MainPhoneNumber then begin if PhoneCount = 0 then begin Phone := TPhone.Create; AddPhone(Phone); Phone.Name := 'Main'; end else Phone := Phones[0]; Phone.Number := Value; end; end; procedure TContact.SetName(const Value: string); begin _Name.Value := Value; end; procedure TContact.SetPhones(Index: Integer; Value: TPhone); begin _Phones[Index] := Value; end; { TContactFilter } function TContactFilter.GetIsEmpty: Boolean; begin Result := (Name = '') and (Address.Street = '') and (Address.City = '') and (Address.Zip = '') and (Address.State = '') and (Address.Country = nil) and (Category = nil); end; function TContactFilter.Matches(Contact: TContact): Boolean; function MatchStr(const Str1, Str2: string): Boolean; begin Result := (Str1 = '') or (Pos(UpperCase(Str1), UpperCase(Str2)) > 0); end; function MatchObj(Obj1, Obj2: TObject): Boolean; begin Result := not Assigned(Obj1) or (Obj1 = Obj2); end; begin Result := Assigned(Contact) and MatchStr(Name, Contact.Name) and MatchStr(Address.Street, Contact.Address.Street) and MatchStr(Address.City, Contact.Address.City) and MatchStr(Address.Zip, Contact.Address.Zip) and MatchStr(Address.State, Contact.Address.State) and MatchObj(Address.Country, Contact.Address.Country) and MatchObj(Category, Contact.Category); end; { TCompany } function TCompany.AddEmployee(Employee: TPerson): Integer; begin Result := _Employees.Add(Employee) end; procedure TCompany.ClearEmployees; begin _Employees.Clear; end; procedure TCompany.DeleteEmployee(Index: Integer); begin _Employees.Delete(Index); end; function TCompany.GetEmployeeCount: Integer; begin Result := _Employees.Count end; function TCompany.GetEmployees(Index: Integer): TPerson; begin Result := _Employees[Index] as TPerson; end; function TCompany.IndexOfEmployee(Employee: TPerson): Integer; begin Result := _Employees.IndexOf(Employee); end; procedure TCompany.InsertEmployee(Index: Integer; Employee: TPerson); begin _Employees.Insert(Index, Employee); end; function TCompany.RemoveEmployee(Employee: TPerson): Integer; begin Result := _Employees.Remove(Employee); end; initialization InstantRegisterClasses([ TAddress, TCategory, TCompany, TContact, TContactFilter, TCountry, TEmail, TPerson, TPhone ]); end. |
From: Carlo B. <car...@us...> - 2004-12-03 16:04:39
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16492/Source/Brokers/UIB Modified Files: InstantUIB.pas InstantUIBConnection.pas InstantUIBConnectionDefEdit.dfm Log Message: UIB broker: TInstantCurrency support added; OnLogin prompt; bug fixing Index: InstantUIBConnectionDefEdit.dfm =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIBConnectionDefEdit.dfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InstantUIBConnectionDefEdit.dfm 11 Oct 2004 08:15:10 -0000 1.1 --- InstantUIBConnectionDefEdit.dfm 3 Dec 2004 16:04:29 -0000 1.2 *************** *** 1,7 **** object InstantUIBConnectionDefEditForm: TInstantUIBConnectionDefEditForm ! Left = 914 ! Top = 281 BorderStyle = bsDialog ! Caption = 'InterBase Connection' ClientHeight = 399 ClientWidth = 362 --- 1,7 ---- object InstantUIBConnectionDefEditForm: TInstantUIBConnectionDefEditForm ! Left = 320 ! Top = 199 BorderStyle = bsDialog ! Caption = 'UIB Connection' ClientHeight = 399 ClientWidth = 362 Index: InstantUIBConnection.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIBConnection.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InstantUIBConnection.pas 11 Oct 2004 08:15:10 -0000 1.1 --- InstantUIBConnection.pas 3 Dec 2004 16:04:29 -0000 1.2 *************** *** 21,24 **** --- 21,28 ---- * The Initial Developer of the Original Code is: Andrea Petrelli * + * Contributor(s): + * Carlo Barazzetta: + * - OnLogin event support + * * ***** END LICENSE BLOCK ***** *) *************** *** 29,39 **** --- 33,48 ---- uses Classes, DB, jvuib; + resourcestring + SLoginPromptFailure = 'Can not find default login prompt dialog. Please add DBLogDlg to the uses section of your main file.'; + type TInstantUIBConnection = class(TCustomConnection) private FDatabase: TJvUIBDataBase; + function Login: Boolean; protected procedure DoConnect; override; procedure DoDisconnect; override; + function GetConnected: Boolean; override; public constructor Create(AOwner: TComponent); override; *************** *** 57,60 **** --- 66,70 ---- begin FDatabase.Free; + FDatabase := nil; inherited; end; *************** *** 63,66 **** --- 73,78 ---- begin inherited; + if LoginPrompt then + Login; FDatabase.Connected := True; end; *************** *** 72,74 **** --- 84,118 ---- end; + function TInstantUIBConnection.GetConnected: Boolean; + begin + Result := assigned(FDatabase) and FDatabase.Connected; + end; + + function TInstantUIBConnection.Login: Boolean; + var + Username, Password, OldPassword: String; + begin + Username := FDatabase.UserName; + Password := FDatabase.PassWord; + if Assigned(OnLogin) then + begin + result := True; + OnLogin(Self, UserName, Password); + end + else + begin + if Assigned(LoginDialogExProc) then + result := LoginDialogExProc(FDatabase.DatabaseName, Username, Password, False) + else + begin + raise EDatabaseError.Create(SLoginPromptFailure); + end; + if result then + begin + FDatabase.UserName := Username; + FDatabase.PassWord := Password; + end; + end; + end; + end. Index: InstantUIB.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIB.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InstantUIB.pas 2 Dec 2004 10:12:55 -0000 1.2 --- InstantUIB.pas 3 Dec 2004 16:04:29 -0000 1.3 *************** *** 21,24 **** --- 21,29 ---- * The Initial Developer of the Original Code is: Andrea Petrelli * + * Contributor(s): + * Carlo Barazzetta: + * - OnLogin event support + * - TInstantCurrency support + * * ***** END LICENSE BLOCK ***** *) *************** *** 79,82 **** --- 84,88 ---- FTransaction: TJvUIBTransaction; FOptions: TInstantUIBOptions; + FOnLogin: TLoginEvent; function GetConnection: TInstantUIBConnection; function GetTransaction: TJvUIBTransaction; *************** *** 89,92 **** --- 95,99 ---- procedure InternalStartTransaction; override; procedure InternalCreateDatabase; override; + procedure AssignLoginOptions; override; function GetDatabaseExists: Boolean; override; public *************** *** 98,101 **** --- 105,109 ---- property Connection: TInstantUIBConnection read GetConnection write SetConnection; property Options: TInstantUIBOptions read FOptions write FOptions default DefaultInstantUIBOptions; + property OnLogin: TLoginEvent read FOnLogin write FOnLogin; end; *************** *** 233,236 **** --- 241,254 ---- { TInstantUIBConnector } + procedure TInstantUIBConnector.AssignLoginOptions; + begin + inherited; + if HasConnection then + begin + if Assigned(FOnLogin) and not Assigned(Connection.OnLogin) then + Connection.OnLogin := FOnLogin; + end; + end; + class function TInstantUIBConnector.ConnectionDefClass: TInstantConnectionDefClass; begin *************** *** 361,364 **** --- 379,384 ---- ftFloat: TargetParams.ByNameAsDouble[SourceParam.Name] := SourceParam.AsFloat; + ftCurrency: + TargetParams.ByNameAsCurrency[SourceParam.Name] := SourceParam.AsCurrency; ftDateTime: TargetParams.ByNameAsDateTime[SourceParam.Name] := SourceParam.AsDateTime; |