Hello there. Hope there's someone with some knowledge of the OpenToolsApi :) I have the following code:

Hello there. Hope there's someone with some knowledge of the OpenToolsApi :) I have the following code:

procedure TDDDIdeFileOpen.OpenEditor(AModuleInfo: IOTAModuleInfo);
var
  LModule: IOTAModule;
begin
  Assert(Assigned(AModuleInfo));
  LModule := AModuleInfo.OpenModule;
  OpenEditor(LModule);
end;

Now assume, the module to open is a Form with a missing component (the packe containing the component is currently not installed). Now AModuleInfo.OpenModule does open and return the module but in between shows a dialog telling that component xyz can not be found with the options to cancel or ignore. Is there an easy way to suppress that dialog?

PS: Debugging designtime packages is not the biggest fun at all...

Comments

  1. Are you sure you want to do that? The user would wonder where his components went, when the dialog is missing...

    ReplyDelete
  2. Not via OpenTools API, as far as I know. I think you'll have to resort to something like (temporarily) assigning Application.OnModalBegin and dismissing the dialog in code (e.g. by setting its ModalResult).

    ReplyDelete
  3. I also experienced this issue in Documentation Insight. Since I only need the memory of pascal source code not the dfm so that I guess I will try using some "proxy" object to load from the real file when the module has not been opened.

    ReplyDelete

Post a Comment