使用“Release”构建时,XE3 Build配置会中断Grid RowSelect

时间:2013-09-26 22:14:33

标签: delphi inheritance delphi-xe3 search-path

我在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”构建进行构建,程序就会非常奇怪,其中select只勾勒出蓝色的行,而multiselect只返回一行作为选定的行数。 显然,“发布”版本中的某些东西已经不同了。

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

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

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

我无法看到如何创建一个可重现的示例,该示例将在另一台计算机上中断,因为我确信它是我的Build配置中的一些设置导致此行为。

0 个答案:

没有答案