I think it's because in WME code there is called sequence like this (eg. in Object Pascal):
procedure OpenButton.OnClick(Sender: TObject);
begin OpenDialog.Execute;
Window.Name:= OpenDialog.FileName;
end;so when you close the OpenDialog window (by pressing CLOSE button), the variable Window.Name can't be set, because OpenDialog.FileName is not set and throws the error.
It can be avoided by using something like this:
if OpenDialog.Execute
thenbegin Window.Name:= OpenDialog.FileName;
end;this code controls, if in OpenDialog was opened some file, else the code inside is not launched.
I think that Mnemonic just overlook this