When I try to load text file with the component TAdvGridImportDialog, I obtain an invalid pointer message and all the applicaton is freeze.
hera is my .dpr
program BugTMS;usesForms,LoadData in 'LoadData.pas' {LoadDataForm};{$R .res}beginApplication.Initialize;Application.CreateForm(TLoadDataForm, LoadDataForm);Application.Run;end.
and the loaddata.pas:
unit LoadData;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, AsgImport, Menus, Grids, AdvObj, BaseGrid, AdvGrid;typeTLoadDataForm = class(TForm)ASG: TAdvStringGrid;DataMenu: TMainMenu;FileMenu: TMenuItem;ImportMenuItem: TMenuItem;AdvGridImportDialog: TAdvGridImportDialog;procedure FileMenuClick(Sender: TObject);private{ Déclarations privées }public{ Déclarations publiques }end;varLoadDataForm:TLoadDataForm;implementation{$R .dfm}procedure TLoadDataForm.FileMenuClick(Sender: TObject);beginAdvGridImportDialog.OpenAndExecute;end;end.
and the loaddata.dfm
and my text file isobject LoadDataForm: TLoadDataFormLeft = 722Top = 348Caption = 'LoadDataForm'ClientHeight = 484ClientWidth = 640Color = clBtnFaceFont.Charset = DEFAULT_CHARSETFont.Color = clWindowTextFont.Height = -11Font.Name = 'MS Sans Serif'Font.Style = []Menu = DataMenuOldCreateOrder = FalsePixelsPerInch = 96TextHeight = 13object ASG: TAdvStringGridLeft = 0Top = 0Width = 640Height = 484Cursor = crDefaultAlign = alClientColor = clWhiteColCount = 3DefaultColWidth = 32DefaultRowHeight = 15DrawingStyle = gdsClassicRowCount = 2Font.Charset = DEFAULT_CHARSETFont.Color = clWindowTextFont.Height = -11Font.Name = 'MS Sans Serif'Font.Style = []Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowMoving, goTabs, goRowSelect]ParentFont = FalseParentShowHint = FalseScrollBars = ssVerticalShowHint = TrueTabOrder = 0HoverRowCells = [hcNormal, hcSelected]HintColor = clYellowOemConvert = TrueActiveCellFont.Charset = DEFAULT_CHARSETActiveCellFont.Color = clWindowTextActiveCellFont.Height = -11ActiveCellFont.Name = 'MS Sans Serif'ActiveCellFont.Style = [fsBold]ActiveCellColor = 9758459ActiveCellColorTo = 1414638AutoThemeAdapt = TrueCellNode.ShowTree = FalseCellNode.TreeColor = clSilverColumnHeaders.Strings = ('N'#176'Bulk concentration [user unit]''Tension [mN/m]')ColumnSize.Key = 'SoftWare\ITC\WITC'ColumnSize.Section = 'Mainform'ColumnSize.Stretch = TrueControlLook.FixedGradientFrom = 15524577ControlLook.FixedGradientTo = 11769496ControlLook.FixedGradientHoverFrom = clGrayControlLook.FixedGradientHoverTo = clWhiteControlLook.FixedGradientDownFrom = clGrayControlLook.FixedGradientDownTo = clSilverControlLook.ControlStyle = csClassicControlLook.DropDownHeader.Font.Charset = DEFAULT_CHARSETControlLook.DropDownHeader.Font.Color = clWindowTextControlLook.DropDownHeader.Font.Height = -11ControlLook.DropDownHeader.Font.Name = 'Tahoma'ControlLook.DropDownHeader.Font.Style = []ControlLook.DropDownHeader.Visible = TrueControlLook.DropDownHeader.Buttons = <>ControlLook.DropDownFooter.Font.Charset = DEFAULT_CHARSETControlLook.DropDownFooter.Font.Color = clWindowTextControlLook.DropDownFooter.Font.Height = -11ControlLook.DropDownFooter.Font.Name = 'Tahoma'ControlLook.DropDownFooter.Font.Style = []ControlLook.DropDownFooter.Visible = TrueControlLook.DropDownFooter.Buttons = <>EnhTextSize = TrueEnhRowColMove = FalseFilter = <>FilterDropDown.Font.Charset = DEFAULT_CHARSETFilterDropDown.Font.Color = clWindowTextFilterDropDown.Font.Height = -11FilterDropDown.Font.Name = 'Tahoma'FilterDropDown.Font.Style = []FilterDropDownClear = '(All)'FilterEdit.TypeNames.Strings = ('Starts with''Ends with''Contains''Not contains''Equal''Not equal''Larger than''Smaller than''Clear')FixedColWidth = 20FixedRowHeight = 20FixedFont.Charset = DEFAULT_CHARSETFixedFont.Color = clWindowTextFixedFont.Height = -11FixedFont.Name = 'MS Sans Serif'FixedFont.Style = [fsBold]FloatFormat = '%.2f'HoverButtons.Buttons = <>HoverButtons.Position = hbLeftFromColumnLeftMouseActions.AllSelect = TrueMouseActions.CaretPositioning = TrueMouseActions.ColSelect = TrueMouseActions.DisjunctRowSelect = TrueMouseActions.RowSelect = TrueNavigation.AllowInsertRow = TrueNavigation.AllowDeleteRow = TrueNavigation.AdvanceOnEnter = TrueNavigation.AdvanceInsert = TrueNavigation.AllowClipboardShortCuts = TrueNavigation.AllowSmartClipboard = TrueNavigation.AllowRTFClipboard = TrueNavigation.AdvanceAuto = TrueNavigation.MoveRowOnSort = TruePrintSettings.DateFormat = 'dd/mm/yyyy'PrintSettings.Font.Charset = DEFAULT_CHARSETPrintSettings.Font.Color = clWindowTextPrintSettings.Font.Height = -11PrintSettings.Font.Name = 'MS Sans Serif'PrintSettings.Font.Style = []PrintSettings.FixedFont.Charset = DEFAULT_CHARSETPrintSettings.FixedFont.Color = clWindowTextPrintSettings.FixedFont.Height = -11PrintSettings.FixedFont.Name = 'MS Sans Serif'PrintSettings.FixedFont.Style = []PrintSettings.HeaderFont.Charset = DEFAULT_CHARSETPrintSettings.HeaderFont.Color = clWindowTextPrintSettings.HeaderFont.Height = -11PrintSettings.HeaderFont.Name = 'MS Sans Serif'PrintSettings.HeaderFont.Style = []PrintSettings.FooterFont.Charset = DEFAULT_CHARSETPrintSettings.FooterFont.Color = clWindowTextPrintSettings.FooterFont.Height = -11PrintSettings.FooterFont.Name = 'MS Sans Serif'PrintSettings.FooterFont.Style = []PrintSettings.Borders = pbNoborderPrintSettings.Centered = FalsePrintSettings.PageNumSep = '/'RowHeaders.Strings = ('N'#176)ScrollColor = 10930928ScrollWidth = 16ScrollHints = shBothSearchFooter.Color = 15524577SearchFooter.ColorTo = 11769496SearchFooter.FindNextCaption = 'Find &next'SearchFooter.FindPrevCaption = 'Find &previous'SearchFooter.Font.Charset = DEFAULT_CHARSETSearchFooter.Font.Color = clWindowTextSearchFooter.Font.Height = -11SearchFooter.Font.Name = 'MS Sans Serif'SearchFooter.Font.Style = []SearchFooter.HighLightCaption = 'Highlight'SearchFooter.HintClose = 'Close'SearchFooter.HintFindNext = 'Find next occurence'SearchFooter.HintFindPrev = 'Find previous occurence'SearchFooter.HintHighlight = 'Highlight occurences'SearchFooter.MatchCaseCaption = 'Match case'SelectionColor = clHighlightSelectionTextColor = clWhiteSizeWithForm = TrueSortSettings.DefaultFormat = ssAutomaticURLColor = clBlackVAlignment = vtaCenterVersion = '7.7.4.2'WordWrap = FalseExplicitTop = 32ExplicitHeight = 423ColWidths = (20194422)RowHeights = (2015)endobject DataMenu: TMainMenuLeft = 256Top = 128object FileMenu: TMenuItemCaption = 'File'OnClick = FileMenuClickobject ImportMenuItem: TMenuItemCaption = '&Import...'Hint = 'Import a text file or an Excel file with two columns'ImageIndex = 19endendendobject AdvGridImportDialog: TAdvGridImportDialogGrid = ASGTextSettings.Fixed = 'Fixed'TextSettings.Automatic = 'Automatic'TextSettings.Custom = 'Custom'TextSettings.FirstRowHeaders = 'First row headers'TextSettings.Caption = 'Import settings'TextSettings.Delimited = 'Delimited'TextSettings.ButtonOK = 'OK'TextSettings.ButtonCancel = 'Cancel'Filter ='Text files (.txt)|.txt|CSV files (.csv)|.csv|Ascii files (.' +'asc)|.asc|All files (.)|.'Left = 160Top = 112endend
1.00E-07;71.481.00E-04;61.422.00E-04;60.495.00E-04;57.51.00E-03;54.832.00E-03;54.325.00E-03;53.340.01;50.820.02;47.310.05;42.880.1;37.240.15;35.040.16;35.040.17;33.630.18;32.820.19;32.550.2;32.140.21;32.290.22;31.820.23;31.90.24;31.870.25;32.630.3;32.43