My solution was to use the "Popupdone" event on the filename selection
Code:
dim shared vShow as l = .f.
dim shared vLogFileName as c = filename_decode("[logPath]\*.log")
vResult = ui_dlg_box("Enter Logging",<<%dlg%
{Background=#204+153+255}
{Font=Comic Sans MS,8}
{region}
[%p=ui_get_file("Input Log Filename","Log(*.Log)|Text (*.txt)",vLogFileName,"X");I=$a5_smart_file%.81vLogFilename!vLogFileNameEvent_*];
{endregion};
{condition=(vShow=.t.)}
Log: [%mw%.40,20vLogFileText!vLogEditEvent_*];
{endregion}
{region}
<15OK!OK><15Cancel!CANCEL>
{endregion};
%dlg%,<<%code%
if left(a_dlg_button,18) = "vLogFileNameEvent_" then
if a_dlg_button = "vLogFileNameEvent_popupdone" then
vLogFileText = ""
fp = file.open(vLogFileName,FILE_RW_SHARED)
WHILE .not. fp.eof()
text = ut(fp.read_line())
vLogFileText = vLogFileText+text+crlf()
END WHILE
fp.close()
vShow = .t.
a_dlg_button = ""
end if
a_dlg_button = ""
end if
if left(a_dlg_button,14) = "vLogEditEvent_" then
if a_dlg_button = "vLogEditEvent_Killfocus" then
save_to_file(vLogFileText,vLogFileName)
a_dlg_button = ""
end if
a_dlg_button = ""
end if
%code%)
Bookmarks