diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-07 12:36:55 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-07 12:36:55 +0200 |
commit | 42326029cbdcb072265beb9905e3549b7b872977 (patch) | |
tree | 7b961099bdc0462687b8dd1c1ead0875a2e6251d /examples | |
parent | 2b0bb6d1167e479404bd5d616f4d6155b1a92255 (diff) | |
download | fpGUI-42326029cbdcb072265beb9905e3549b7b872977.tar.xz |
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.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/apps/docedit/frm_main.pas | 1 | ||||
-rw-r--r-- | examples/apps/docedit/frm_options.pas | 6 | ||||
-rw-r--r-- | examples/gui/filedialog/filedialog.lpi | 4 | ||||
-rw-r--r-- | examples/gui/filedialog/filedialog.lpr | 9 | ||||
-rw-r--r-- | examples/gui/gauges/gaugetest.lpi | 5 | ||||
-rw-r--r-- | examples/gui/gauges/gaugetest.lpr | 2 |
6 files changed, 13 insertions, 14 deletions
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 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> 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 := '<nothing selected>' + 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 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=".exe"/> </General> <VersionInfo> 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; |