[Lazarus] savedialog is not shown
Andrea Mauri
andrea.mauri.75 at gmail.com
Fri Jul 6 13:09:15 CEST 2012
Dear all,
also removing the out of memory problem the savedialog is not shown.
Someone can give me a feedback in order to understand the problem? What
can I check in order to understand why the savedialog is not shown?
It is a big issue for me since this affect one of our commercial product.
Let me know,
Andrea
Il 03/07/2012 10:28, Andrea Mauri ha scritto:
> Il 02/07/2012 15:56, Martin ha scritto:
>>
>> I don't know anything about the issue itself, but have you tried setting
>> a watchpoint (context menu in watches list). (Scope = global / Acess
>> write)
>>
>> Set the watchpoint after TCommonDialog.DoExecute has initialized the
>> value. The watchpoint should stop execution if the value is modified
>
> I tried to evaluate when FUserChoice is assigned 2 (mrCancel).
>
> function TCommonDialog.DoExecute : boolean;
> var
> CanClose: boolean;
> begin
> FCanCloseCalled := False;
> if Assigned(FOnShow) then
> FOnShow(Self);
>
> --> before this is FUserChoice=0 (mrNone)
>
> TWSCommonDialogClass(WidgetSetClass).ShowModal(Self);
>
> --> after this is FUserChoice=2 (mrCancel)
>
> I look deeper and I found that in:
>
> class procedure TWin32WSOpenDialog.VistaDialogShowModal(ADialog:
> IFileDialog; const AOpenDialog: TOpenDialog);
> var
> FileDialogEvents: IFileDialogEvents;
> Cookie: DWord;
> CanClose: Boolean;
> begin
> FileDialogEvents := TFileDialogEvents.Create(AOpenDialog);
> ADialog.Advise(FileDialogEvents, @Cookie);
> try
> AOpenDialog.DoShow;
> repeat
> ADialog.Show(GetParentWnd);
>
> --> I set a breakpoint on the line below, the dialog is not shown,
> UserChoice in the following 'if' line is mrNone, so different from mrOk
> and then UserChoice is set to mrCancel
>
> if (AOpenDialog.UserChoice <> mrOk) then
> begin
> CanClose := True;
> AOpenDialog.DoCanClose(CanClose);
> AOpenDialog.UserChoice := mrCancel;
> end
> else
> CanClose := True;
> until CanClose;
> finally
> ADialog.unadvise(Cookie);
> FileDialogEvents := nil;
> end;
> end;
>
More information about the Lazarus
mailing list