From f9aed3bf96db7c51b2362e9149279015ed9eb28c Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 15 Dec 2009 12:06:14 +0200 Subject: Updated Demo 21 to support latest tiOPF2 changes. * tiOPF2 classes got renamed a bit. --- .../demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas | 6 +++--- .../demos/Demo_21_AdrsBook_MGM/frmcitylist.pas | 8 ++++---- .../demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas | 6 +++--- .../demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas | 12 ++++++------ .../demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas | 6 +++--- .../tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas | 22 +++++++++++----------- 6 files changed, 30 insertions(+), 30 deletions(-) (limited to 'extras/tiopf/demos') diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas index b8212b3d..931b36c5 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas @@ -8,7 +8,7 @@ uses SysUtils, Classes, fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, fpg_combobox, fpg_dialogs, fpg_menu, - model, tiFormMediator; + model, tiModelMediator; type TAddressEditForm = class(TfpgForm) @@ -32,7 +32,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: AddressEditForm} FData: TAddress; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure SetData(const AValue: TAddress); procedure SetupMediators; public @@ -76,7 +76,7 @@ procedure TAddressEditForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddProperty('AddressType', cbType).ValueList := gContactManager.AddressTypeList; FMediator.AddProperty('Nr', edNo); FMediator.AddProperty('Street', edStreet); diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas index f14c13ee..522362d1 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas @@ -9,7 +9,7 @@ uses fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_dialogs, fpg_menu, fpg_panel, - tiFormMediator, model; + tiModelMediator, model; type @@ -24,7 +24,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: CityListForm} FData: TCityList; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure SetData(const AValue: TCityList); procedure SetupMediators; procedure btnEditClicked(Sender: TObject); @@ -63,7 +63,7 @@ procedure TCityListForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('Name(110);Zip(80);CountryAsString(150)', grdName1); end; FMediator.Subject := FData; @@ -74,7 +74,7 @@ procedure TCityListForm.btnEditClicked(Sender: TObject); var c: TCity; begin - c := TCity(TStringGridMediator(FMediator.FindByComponent(grdName1).Mediator).SelectedObject); + c := TCity(TtiStringGridMediatorView(FMediator.FindByComponent(grdName1).Mediator).SelectedObject); // tiShowString(c.AsDebugString); if not Assigned(c) then diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas index 31a6326d..1b6f27f7 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas @@ -8,7 +8,7 @@ uses SysUtils, Classes, fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, fpg_dialogs, fpg_combobox, - model, tiFormMediator; + model, tiModelMediator; type @@ -25,7 +25,7 @@ type btnCancel: TfpgButton; btnDebug: TfpgButton; {@VFD_HEAD_END: CityEditForm} - FMediator: TFormMediator; + FMediator: TtiModelMediator; FData: TCity; procedure SetData(const AValue: TCity); procedure SetupMediators; @@ -72,7 +72,7 @@ procedure TCityEditForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddProperty('Name', edName); FMediator.AddProperty('ZIP', edZIP); FMediator.AddProperty('Country', cbCountry).ValueList := gContactManager.CountryList; diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas index 5832af55..8bd46e31 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas @@ -8,7 +8,7 @@ uses SysUtils, Classes, fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, fpg_listview, fpg_memo, - model, tiFormMediator; + model, tiModelMediator; type @@ -35,8 +35,8 @@ type btnDebug: TfpgButton; {@VFD_HEAD_END: ContactEditForm} FData: TContact; - FMediator: TFormMediator; - FAdrsMediator: TFormMediator; + FMediator: TtiModelMediator; + FAdrsMediator: TtiModelMediator; procedure SetData(const AValue: TContact); procedure SetupMediators; procedure btnDebugClicked(Sender: TObject); @@ -77,7 +77,7 @@ procedure TContactEditForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddProperty('FirstName', edFName); FMediator.AddProperty('LastName', edLName); FMediator.AddProperty('EMail', edEmail); @@ -89,7 +89,7 @@ begin if not Assigned(FAdrsMediator) then begin - FAdrsMediator := TFormMediator.Create(self); + FAdrsMediator := TtiModelMediator.Create(self); FAdrsMediator.AddComposite({'AddressType.Name;}'AddressType4GUI(50,"Type");Nr;Street;Telephone1', lvAddresses); end; FAdrsMediator.Subject := FData.AddressList; @@ -105,7 +105,7 @@ procedure TContactEditForm.btnEditClicked(Sender: TObject); var obj: TAddress; begin - obj := TAddress(TListViewMediator(FAdrsMediator.FindByComponent(lvAddresses).Mediator).SelectedObject); + obj := TAddress(TtiListViewMediatorView(FAdrsMediator.FindByComponent(lvAddresses).Mediator).SelectedObject); tiShowString(obj.AsDebugString); if not Assigned(obj) then diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas index 0a6a6332..c9f54537 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas @@ -9,7 +9,7 @@ uses fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_dialogs, fpg_menu, fpg_panel, - model, tiFormMediator; + model, tiModelMediator; type @@ -24,7 +24,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: CountryListForm} FData: TCountryList; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure SetData(const AValue: TCountryList); procedure SetupMediators; procedure btnEditClicked(Sender: TObject); @@ -62,7 +62,7 @@ procedure TCountryListForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('ISO(60);Name(110)', grdName1); end; FMediator.Subject := FData; diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas index 374a971a..979e6592 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas @@ -10,7 +10,7 @@ uses fpg_base, fpg_main, fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_dialogs, fpg_menu, { tiOPF } - tiFormMediator; + tiModelMediator; type { The main application window } @@ -26,7 +26,7 @@ type miEdit: TfpgPopupMenu; miSystem: TfpgPopupMenu; {@VFD_HEAD_END: MainForm} - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure FormShow(Sender: TObject); procedure GridDoubleClicked(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); procedure SetupMediators; @@ -68,7 +68,7 @@ procedure TMainForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('FirstName;LastName(130);EMail(180);Mobile(130);Comments(200)', grdContacts); end; FMediator.Subject := gContactManager.ContactList; @@ -95,7 +95,7 @@ begin tiAppError('You need to select a Contact first'); Exit; end; - c := TContact(TStringGridMediator(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); + c := TContact(TtiStringGridMediatorView(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); if not Assigned(c) then Exit; //==> @@ -115,7 +115,7 @@ begin tiAppError('You need to select a Contact first'); Exit; end; - c := TContact(TStringGridMediator(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); + c := TContact(TtiStringGridMediatorView(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); if tiAppConfirmation('Are you sure you want to delete <%s>', [c.FirstName + ' ' + c.LastName]) then begin @@ -266,11 +266,11 @@ end; initialization RegisterFallBackMediators; - gMediatorManager.RegisterMediator(TStringGridMediator, TContactList); - gMediatorManager.RegisterMediator(TListViewMediator, TAddressList); - gMediatorManager.RegisterMediator(TStringGridMediator, TCityList); - gMediatorManager.RegisterMediator(TStringGridMediator, TCountryList); - gMediatorManager.RegisterMediator(TMediatorDynamicComboBoxView, TCity, 'Country'); - gMediatorManager.RegisterMediator(TMediatorDynamicComboBoxView, TAddressType, 'AddressType'); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TContactList); + gMediatorManager.RegisterMediator(TtiListViewMediatorView, TAddressList); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TCityList); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TCountryList); + gMediatorManager.RegisterMediator(TtiDynamicComboBoxMediatorView, TCity, 'Country'); + gMediatorManager.RegisterMediator(TtiDynamicComboBoxMediatorView, TAddressType, 'AddressType'); end. -- cgit v1.2.3-70-g09d2 From 42326029cbdcb072265beb9905e3549b7b872977 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 7 Apr 2010 12:36:55 +0200 Subject: All sample projects updated so all of them can compile correctly. * Replaced ModalResult magic numbers with enum values. * Updated project unit output directories. * Updated tiOPF examples with latest unit names. * Updated outdated projects still references old fpGUI unit names. --- examples/apps/docedit/frm_main.pas | 1 - examples/apps/docedit/frm_options.pas | 6 ++---- examples/gui/filedialog/filedialog.lpi | 4 ++-- examples/gui/filedialog/filedialog.lpr | 9 ++++++--- examples/gui/gauges/gaugetest.lpi | 5 ++--- examples/gui/gauges/gaugetest.lpr | 2 +- extras/tiopf/demos/Common/Model_View.pas | 4 ++-- extras/tiopf/demos/Common/frm_pickdatabase.pas | 2 -- .../tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi | 7 +++---- .../demos/Demo_04_CreateDatabase/frm_main.pas | 3 --- extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi | 11 ++++++----- .../tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi | 11 ++++++----- extras/tiopf/demos/Demo_08_Collection/demo_08.lpi | 11 ++++++----- extras/tiopf/demos/Demo_08_Collection/frm_main.pas | 8 ++++---- .../Demo_20_ListMediators/demo_listmediators.lpi | 8 +++----- .../tiopf/demos/Demo_20_ListMediators/frmMain.pas | 15 +++++++------- .../Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi | 5 ++++- .../Demo_TtiBaseObject/PerformanceTesting.lpi | 11 ++++++----- .../demos/Demo_TtiBaseObject/performancetest.lpi | 23 ++++++++++------------ .../tiopf/demos/EditControlsDemo/editmediators.lpi | 8 +++----- extras/tiopf/demos/EditControlsDemo/frmMain.pas | 6 +++--- extras/tiopf/demos/ListControlDemo/frmMain.pas | 4 ++-- .../demos/ListControlDemo/listcontroldemo.lpi | 13 +++++------- .../demos/ListControlDemo/listcontroldemo.lpr | 2 +- .../demos/StringGridMediatorDemo/frm_main.pas | 14 ++++++------- .../StringGridMediatorDemo/frm_personmaint.pas | 9 +++------ .../stringgridmediatordemo.lpi | 13 +++++------- .../stringgridmediatordemo.lpr | 2 +- extras/tiopf/demos/rtf_reporting/demoproject.lpi | 8 +++++--- extras/x11_wininfo/x11wininfo.lpi | 4 ++-- extras/x11_wininfo/x11wininfo.lpr | 1 - 31 files changed, 107 insertions(+), 123 deletions(-) (limited to 'extras/tiopf/demos') diff --git a/examples/apps/docedit/frm_main.pas b/examples/apps/docedit/frm_main.pas index 8f3b7369..f6404b79 100644 --- a/examples/apps/docedit/frm_main.pas +++ b/examples/apps/docedit/frm_main.pas @@ -275,7 +275,6 @@ begin Text := 'Quit'; FontDesc := '#Label1'; ImageName := 'stdimg.Quit'; - ModalResult := 0; ShowImage := True; OnClick := @btnQuitClicked; end; diff --git a/examples/apps/docedit/frm_options.pas b/examples/apps/docedit/frm_options.pas index 95538577..d34ef758 100644 --- a/examples/apps/docedit/frm_options.pas +++ b/examples/apps/docedit/frm_options.pas @@ -155,7 +155,6 @@ begin Text := '...'; FontDesc := '#Label1'; ImageName := ''; - ModalResult := 0; end; edtFPDoc := TfpgEdit.Create(self); @@ -175,7 +174,6 @@ begin Text := '...'; FontDesc := '#Label1'; ImageName := ''; - ModalResult := 0; end; cbShowHints := TfpgCheckBox.Create(self); @@ -204,7 +202,7 @@ begin Text := 'OK'; FontDesc := '#Label1'; ImageName := 'stdimg.ok'; - ModalResult := 1; + ModalResult := mrOK; end; btnCancel := TfpgButton.Create(self); @@ -215,7 +213,7 @@ begin Text := 'Cancel'; FontDesc := '#Label1'; ImageName := 'stdimg.cancel'; - ModalResult := 2; + ModalResult := mrCancel; end; lblName5 := TfpgLabel.Create(self); diff --git a/examples/gui/filedialog/filedialog.lpi b/examples/gui/filedialog/filedialog.lpi index bd328806..2291e3f1 100644 --- a/examples/gui/filedialog/filedialog.lpi +++ b/examples/gui/filedialog/filedialog.lpi @@ -1,11 +1,11 @@ - - + + diff --git a/examples/gui/filedialog/filedialog.lpr b/examples/gui/filedialog/filedialog.lpr index 676100cc..37f90ddf 100644 --- a/examples/gui/filedialog/filedialog.lpr +++ b/examples/gui/filedialog/filedialog.lpr @@ -55,7 +55,10 @@ type function TMyDBLoginDlg.GetDatabase: TfpgString; begin - Result := aStringList.ValueFromIndex[cbDatabases.FocusItem]; + if cbDatabases.FocusItem = -1 then + Result := '' + else + Result := aStringList.ValueFromIndex[cbDatabases.FocusItem]; end; procedure TMyDBLoginDlg.PopulateComboDb; @@ -83,13 +86,13 @@ begin dlg := TMyDBLoginDlg.Create(nil); try dlg.WindowTitle := 'Sample Login'; - if dlg.ShowModal = 1 then + if dlg.ShowModal = mrOK then begin TfpgMessageDialog.Information('User Results', 'User=' + dlg.UserID + #13 + 'Pass=' + dlg.Password + #13 + 'Database=' + dlg.Database, [mbOK]); - fpgApplication.ProcessMessages; +// fpgApplication.ProcessMessages; end; finally dlg.Free; diff --git a/examples/gui/gauges/gaugetest.lpi b/examples/gui/gauges/gaugetest.lpi index 60994bb5..731e6f4d 100644 --- a/examples/gui/gauges/gaugetest.lpi +++ b/examples/gui/gauges/gaugetest.lpi @@ -1,15 +1,14 @@ - - + + - diff --git a/examples/gui/gauges/gaugetest.lpr b/examples/gui/gauges/gaugetest.lpr index 3e7de4d4..d5ef47ab 100644 --- a/examples/gui/gauges/gaugetest.lpr +++ b/examples/gui/gauges/gaugetest.lpr @@ -72,7 +72,7 @@ begin Text := 'Close'; FontDesc := '#Label1'; ImageName := 'stdimg.close'; - ModalResult := 1; + ModalResult := mrOK; OnClick:= @OnCloseClick; end; diff --git a/extras/tiopf/demos/Common/Model_View.pas b/extras/tiopf/demos/Common/Model_View.pas index ad027534..ceac389f 100644 --- a/extras/tiopf/demos/Common/Model_View.pas +++ b/extras/tiopf/demos/Common/Model_View.pas @@ -13,7 +13,7 @@ uses type { TMemo - Name } - TPerson_Name_Memo_Mediator = class(TMediatorMemoView) + TPerson_Name_Memo_Mediator = class(TtiMemoMediatorView) protected procedure SetupGUIandObject; override; end; @@ -40,7 +40,7 @@ end; procedure TPerson_Name_Memo_Mediator.SetupGUIandObject; begin inherited SetupGUIandObject; - EditControl.Enabled := False; // fpGUI doesn't have a ReadOnly property yet + View.Enabled := False; // fpGUI doesn't have a ReadOnly property yet end; diff --git a/extras/tiopf/demos/Common/frm_pickdatabase.pas b/extras/tiopf/demos/Common/frm_pickdatabase.pas index de215829..7dcee309 100644 --- a/extras/tiopf/demos/Common/frm_pickdatabase.pas +++ b/extras/tiopf/demos/Common/frm_pickdatabase.pas @@ -226,7 +226,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 0; @@ -349,7 +348,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 11; diff --git a/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi b/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi index d2059b58..34df30b5 100644 --- a/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi +++ b/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi @@ -1,11 +1,11 @@ - - + + @@ -56,6 +56,7 @@ + @@ -63,8 +64,6 @@ - diff --git a/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas b/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas index 4bd0c9ab..cee11cd0 100644 --- a/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas +++ b/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas @@ -108,7 +108,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 0; @@ -131,7 +130,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 1; @@ -154,7 +152,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 2; diff --git a/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi b/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi index 3e2e075a..4a8402a2 100644 --- a/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi +++ b/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi @@ -1,17 +1,16 @@ - - + + - @@ -48,6 +47,9 @@ + + + @@ -55,8 +57,7 @@ - + diff --git a/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi b/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi index a4d89aea..10179042 100644 --- a/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi +++ b/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi @@ -1,17 +1,16 @@ - - + + - @@ -54,6 +53,9 @@ + + + @@ -61,8 +63,7 @@ - + diff --git a/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi b/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi index f8e27367..04d2b379 100644 --- a/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi +++ b/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi @@ -1,17 +1,16 @@ - - + + - @@ -68,6 +67,9 @@ + + + @@ -75,8 +77,7 @@ - + diff --git a/extras/tiopf/demos/Demo_08_Collection/frm_main.pas b/extras/tiopf/demos/Demo_08_Collection/frm_main.pas index 170ef96b..34241b17 100644 --- a/extras/tiopf/demos/Demo_08_Collection/frm_main.pas +++ b/extras/tiopf/demos/Demo_08_Collection/frm_main.pas @@ -10,7 +10,7 @@ uses fpg_listbox, fpg_memo, fpg_combobox, fpg_grid, fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar, fpg_progressbar, fpg_radiobutton, fpg_tab, fpg_menu, - fpg_panel, Client_BOM, tiFormMediator; + fpg_panel, Client_BOM, tiModelMediator; type @@ -31,7 +31,7 @@ type grdCollection: TfpgStringGrid; {@VFD_HEAD_END: MainForm} FClients: TClients; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure MainFormShow(Sender: TObject); procedure CreateTable; procedure DropTable; @@ -112,7 +112,7 @@ procedure TMainForm.CreateMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('ClientName(200,"Client name");ClientID(80,"Client ID")', grdCollection); end; FMediator.Subject := FClients; @@ -327,6 +327,6 @@ begin end; initialization - gMediatorManager.RegisterMediator(TStringGridMediator, TClients); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TClients); end. diff --git a/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi b/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi index 5cfa02ee..ece8df27 100644 --- a/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi +++ b/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi @@ -1,15 +1,14 @@ - - + + - @@ -64,6 +63,7 @@ + @@ -77,8 +77,6 @@ - diff --git a/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas b/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas index 85a51e30..f186340b 100644 --- a/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas +++ b/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas @@ -7,7 +7,7 @@ interface uses SysUtils, Classes, fpg_base, fpg_main, fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_checkbox, fpg_panel, fpg_listview, fpg_listbox, fpg_combobox, - Model, tiFormMediator, tiMediators; + Model, tiModelMediator, tiMediators; type @@ -15,9 +15,8 @@ type private { The object we will be working with. } FPersonList: TPersonList; - FMediator: TFormMediator; - medCombo: TMediatorComboBoxView; - + FMediator: TtiModelMediator; + medCombo: TtiComboBoxMediatorView; procedure btnViaCodeChangeClick(Sender: TObject); procedure btnQuitClicked(Sender: TObject); procedure btnViaCodeAddClick(Sender: TObject); @@ -89,17 +88,17 @@ end; procedure TMainForm.btnShowDeletedClick(Sender: TObject); var - med: TMediatorView; + med: TtiMediatorView; begin med := FMediator.FindByComponent(grdName1).Mediator; - tiShowString(TStringGridMediator(med).SelectedObject.AsDebugString); + tiShowString(TtiStringGridMediatorView(med).SelectedObject.AsDebugString); end; procedure TMainForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.Name := 'DemoFormMediator'; FMediator.AddComposite('Name(150,"Name",<);Age(50,"Age",>);GenderGUI(80,"Gender",|)', grdName1); // FMediator.AddComposite('Name(150,"Name",<);Age(75,"Age",>);GenderGUI(50,"Gender",|)', lvName1); @@ -271,7 +270,7 @@ end; initialization - gMediatorManager.RegisterMediator(TStringGridMediator, TtiObjectList); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TtiObjectList); // gMediatorManager.RegisterMediator(TListBoxMediator, TPersonList); // gMediatorManager.RegisterMediator(TListViewMediator, TtiObjectList); diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi index b497cf84..6f88bb12 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi @@ -81,6 +81,9 @@ + + + @@ -89,7 +92,7 @@ - diff --git a/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi b/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi index 08c1bbe6..047ccf7a 100644 --- a/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi +++ b/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi @@ -1,15 +1,14 @@ - - + + - @@ -48,9 +47,11 @@ + + + - diff --git a/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi b/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi index a7940dba..cf7d5e86 100644 --- a/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi +++ b/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi @@ -1,11 +1,12 @@ - - + + + + - @@ -32,7 +33,7 @@ - + @@ -42,12 +43,12 @@ - + - + @@ -72,25 +73,21 @@ - + - + - - - + - - diff --git a/extras/tiopf/demos/EditControlsDemo/editmediators.lpi b/extras/tiopf/demos/EditControlsDemo/editmediators.lpi index bceed7e6..0f0543c7 100644 --- a/extras/tiopf/demos/EditControlsDemo/editmediators.lpi +++ b/extras/tiopf/demos/EditControlsDemo/editmediators.lpi @@ -1,15 +1,14 @@ - - + + - @@ -65,10 +64,9 @@ + - diff --git a/extras/tiopf/demos/EditControlsDemo/frmMain.pas b/extras/tiopf/demos/EditControlsDemo/frmMain.pas index 75719922..03749901 100644 --- a/extras/tiopf/demos/EditControlsDemo/frmMain.pas +++ b/extras/tiopf/demos/EditControlsDemo/frmMain.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, fpg_form, fpg_button, fpg_label, fpg_edit, fpg_trackbar, - fpg_combobox, fpg_memo, Model, tiFormMediator, Model_View; + fpg_combobox, fpg_memo, Model, tiModelMediator, Model_View; type TMainForm = class(TfpgForm) @@ -25,7 +25,7 @@ type { The object we will be working with. } FPerson: TPerson; { Form Mediator } - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure btnCloseClick(Sender: TObject); procedure btnShowModelClick(Sender: TObject); @@ -183,7 +183,7 @@ begin } if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.Name := 'DemoFormMediator'; FMediator.AddProperty('Name', edtName); FMediator.AddProperty('Age', AgeTrackBar); diff --git a/extras/tiopf/demos/ListControlDemo/frmMain.pas b/extras/tiopf/demos/ListControlDemo/frmMain.pas index b95924e0..551a6b18 100644 --- a/extras/tiopf/demos/ListControlDemo/frmMain.pas +++ b/extras/tiopf/demos/ListControlDemo/frmMain.pas @@ -5,8 +5,8 @@ unit frmMain; interface uses - Classes, SysUtils, gui_form, gui_button, gui_label, gui_edit, gui_trackbar, - gui_combobox, gui_checkbox, gui_listbox, Model, + Classes, SysUtils, fpg_form, fpg_button, fpg_label, fpg_edit, fpg_trackbar, + fpg_combobox, fpg_checkbox, fpg_listbox, Model, tiGenericEditMediators, tiGenericListMediators; type diff --git a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi index 57dc14b8..6faa819b 100644 --- a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi +++ b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi @@ -1,15 +1,14 @@ - - + + - @@ -61,15 +60,13 @@ - + + - - - - diff --git a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr index 0761498e..6455aa9b 100644 --- a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr +++ b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frmMain, Model, Constants, Model_View; + Classes, fpg_base, fpg_main, frmMain, Model, Constants, Model_View; procedure MainProc; diff --git a/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas b/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas index 7adc3145..3878ad61 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas +++ b/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas @@ -5,17 +5,17 @@ unit frm_main; interface uses - SysUtils, Classes, gfxbase, fpgfx, gui_edit, - gfx_widget, gui_form, gui_label, gui_button, - gui_basegrid, gui_grid, gui_menu, - gui_panel, gui_popupcalendar, gui_gauge, Model, tiCompositeMediators; + SysUtils, Classes, fpg_base, fpg_main, fpg_edit, + fpg_widget, fpg_form, fpg_label, fpg_button, + fpg_basegrid, fpg_grid, fpg_menu, + fpg_panel, fpg_popupcalendar, fpg_gauge, Model, tiListMediators; type TMainForm = class(TfpgForm) private FList: TPersonList; - medGrid: TCompositeStringGridMediator; + medGrid: TtiStringGridMediatorView; procedure SetupMediators; procedure ValidateData; procedure btnAddClicked(Sender: TObject); @@ -49,13 +49,13 @@ type implementation uses - gui_dialogs, frm_personmaint; + fpg_dialogs, frm_personmaint; {@VFD_NEWFORM_IMPL} procedure TMainForm.SetupMediators; begin - medGrid := TCompositeStringGridMediator.CreateCustom(FList, grdName1, 'Name(200);Age'); + medGrid := TtiStringGridMediatorView.CreateCustom(FList, grdName1, 'Name(200);Age'); end; procedure TMainForm.ValidateData; diff --git a/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas b/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas index 00296e96..96620e92 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas +++ b/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas @@ -5,12 +5,9 @@ unit frm_personmaint; interface uses - SysUtils, Classes, gfxbase, fpgfx, gui_edit, - gfx_widget, gui_form, gui_label, gui_button, - gui_listbox, gui_memo, gui_combobox, gui_basegrid, gui_grid, - gui_dialogs, gui_checkbox, gui_tree, gui_trackbar, - gui_progressbar, gui_radiobutton, gui_tab, gui_menu, - gui_panel, gui_popupcalendar, gui_gauge, model, model_view; + SysUtils, Classes, fpg_base, fpg_main, fpg_edit, + fpg_form, fpg_label, fpg_button, + model, model_view; type diff --git a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi index c7b38fd4..b18e4bf3 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi +++ b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi @@ -1,15 +1,14 @@ - - + + - @@ -66,20 +65,18 @@ - + + - - - - diff --git a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr index 2a0a31e3..366718b0 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr +++ b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frm_main, Model, Constants, tiOPFfpGUI, frm_personmaint, + Classes, fpg_main, frm_main, Model, Constants, tiOPFfpGUI, frm_personmaint, Model_View; diff --git a/extras/tiopf/demos/rtf_reporting/demoproject.lpi b/extras/tiopf/demos/rtf_reporting/demoproject.lpi index ac6d8c87..dd154d16 100644 --- a/extras/tiopf/demos/rtf_reporting/demoproject.lpi +++ b/extras/tiopf/demos/rtf_reporting/demoproject.lpi @@ -1,11 +1,11 @@ - - + + @@ -46,8 +46,10 @@ + + + - diff --git a/extras/x11_wininfo/x11wininfo.lpi b/extras/x11_wininfo/x11wininfo.lpi index 0096dd7b..ff317c0e 100644 --- a/extras/x11_wininfo/x11wininfo.lpi +++ b/extras/x11_wininfo/x11wininfo.lpi @@ -1,11 +1,11 @@ - - + + diff --git a/extras/x11_wininfo/x11wininfo.lpr b/extras/x11_wininfo/x11wininfo.lpr index 39e0eae4..11486f5b 100644 --- a/extras/x11_wininfo/x11wininfo.lpr +++ b/extras/x11_wininfo/x11wininfo.lpr @@ -204,7 +204,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 0; -- cgit v1.2.3-70-g09d2