0

我在 XE3 中发现了一个我不确定是我自己造成的问题,我做了一个小应用程序。整个代码是

unit xe3testrelease;
interface
uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Grids, Vcl.DBGrids, Data.DB,
  IBODataset, IB_Components, IB_Access;

type
TForm1 = class(TForm)
    IBOTransaction1: TIBOTransaction;
    IBODatabaseMain: TIBODatabase;
    IBOQuery1: TIBOQuery;
    DataSourceQuery: TDataSource;
    IBOTransactionQuery: TIBOTransaction;
    DBGrid1: TDBGrid;
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;

implementation

{$R *.dfm}

end.

==========================================

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 509
  ClientWidth = 905
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object DBGrid1: TDBGrid
    Left = 40
    Top = 128
    Width = 817
    Height = 353
    DataSource = DataSourceQuery
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit, dgMultiSelect, dgTitleClick, dgTitleHotTrack]
    TabOrder = 0
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
  end
  object IBOTransaction1: TIBOTransaction
    IB_Connection = IBODatabaseMain
    Isolation = tiCommitted
    Left = 272
    Top = 16
  end
  object IBODatabaseMain: TIBODatabase
    CacheStatementHandles = False
    LoginCaption = 'MASTER COMPANY DATABASE'
    LoginPrompt = True
    SQLDialect = 3
    DatabaseName = 'DANTMFG_1_1'
    Params.Strings = (
      'USER NAME=SYSDBA'
      'PATH=D:\data\OCEAN01.fdb')
    Isolation = tiCommitted
    DriverName = ''
    Left = 54
    Top = 16
    SavedPassword = '.JuMbLe.01.432B0639073E0E4B49'
  end
  object IBOQuery1: TIBOQuery
    Active = True
    DatabaseName = 'DANTMFG_1_1'
    IB_Connection = IBODatabaseMain
    IB_Transaction = IBOTransactionQuery
    PreparedEdits = True
    PreparedInserts = False
    ReadOnly = True
    RecordCountAccurate = True
    SQL.Strings = (
      'select * from part')
    FieldOptions = []
    Left = 48
    Top = 72
  end
  object DataSourceQuery: TDataSource
    DataSet = IBOQuery1
    Left = 152
    Top = 72
  end
  object IBOTransactionQuery: TIBOTransaction
    IB_Connection = IBODatabaseMain
    ReadOnly = True
    Isolation = tiCommitted
    Left = 272
    Top = 72
  end

结尾

我将网格选项 dgmultiselect 和 dgrowselect 都设置为 true。

如果我使用调试编译项目,网格会为每个选定的行显示一条完整的蓝线,并允许多个选定的行以蓝色突出显示......这可行。

但是,如果我使用“发布”构建构建,程序的行为非常奇怪,其中选择仅将行勾勒为蓝色,而多选仅返回一行作为所选行数。显然“发布”构建中的某些内容是不同的已经坏了。

我检查了所有路径,直到我脸色发青,但我看不到发生了什么。

Release 和 Debug 中的所有路径看起来都一样,任何人都可以给我一个线索,看看我可能会在哪里看。

如果我构建了一些客户端应用程序,如果使用 Release 构建在 XE3 中编译,它们都会以奇怪的方式中断。

我看不出如何创建一个可在另一台机器上中断的可重现示例,因为我确信这是我的构建配置中的某些设置导致了这种行为。

4

0 回答 0