But when the last line of the SRT is commented out, it continues to work with no problems.
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 546
Top = 119
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'Dialog1'
ClientHeight = 173
ClientWidth = 536
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object lblLocation: TLabel
Left = 30
Top = 15
Width = 251
Height = 16
Caption = 'Select location for file to be created:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object lblFileName: TLabel
Left = 32
Top = 75
Width = 76
Height = 16
Caption = 'File Name:'
end
object ebFolder: TEdit
Left = 30
Top = 40
Width = 278
Height = 21
TabOrder = 1
TextHint = 'File location...'
end
object btnFolder: tMSButton
Left = 328
Top = 37
Width = 64
Height = 25
DoubleBuffered = True
Glyph.Data = {
F6000000424DF600000000000000760000002800000010000000100000000100
0400000000008000000000000000000000001000000010000000000000000000
80000080000000808000800000008000800080800000C0C0C000808080000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777
77777777777777777777000000000007777700333333333077770B0333333333
07770FB03333333330770BFB0333333333070FBFB000000000000BFBFBFBFB07
77770FBFBFBFBF0777770BFB0000000777777000777777770007777777777777
7007777777770777070777777777700077777777777777777777}
ParentDoubleBuffered = False
TabOrder = 0
DoBrowse = False
Filter = 'Any file (*.*)|*.*'
BrowseStyle = fbFolder
end
object ebFileName: TEdit
Left = 30
Top = 100
Width = 168
Height = 21
TabOrder = 2
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,btnFolder,OnClick,DirBrowse
Show>Dialog1,r
SRT>DirBrowse
**BREAKPOINT**
SetDialogProperty>Dialog1,btnFolder,DoBrowse,True
//Watch variables after next line is executed.
GetDialogProperty>Dialog1,btnFolder,Filename,strFileName
SetDialogProperty>Dialog1,ebFolder,Text,strFileName
//Comment this line out and there is no problem
GetDialogProperty>Dialog1,ebFileName,Text,FileName
END>DirBrowse