Jump to content

Failed to delete tab at index 0


Astrolab

Recommended Posts

When i change application type from standalone to Isapi module


i get this exception:


 


An Exception has occured in application:


Failed to delete tab at index 0


 


standalone app works.


 


here is dpr:


//{$define UNIGUI_VCL} // Comment out this line to turn this project into an ISAPI module

 

{$ifndef UNIGUI_VCL}

library

{$else}

program

{$endif}

  myApp;

 

uses

  uniGUIISAPI,

  Forms,

  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},

  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},

  Main in 'Main.pas' {MainForm: TUniForm}

  // here goes my others units

;

 

{$R *.res}

 

{$ifndef UNIGUI_VCL}

exports

  GetExtensionVersion,

  HttpExtensionProc,

  TerminateExtension;

{$endif}

 

begin

{$ifdef UNIGUI_VCL}

  ReportMemoryLeaksOnShutdown := True;

  Application.Initialize;

  TUniServerModule.Create(Application);

  Application.Run;

{$endif}

end.

 


Link to comment
Share on other sites

  • 1 year later...
12 minutes ago, DiegoNBR said:

Hello, did you find out what this problem is? The same is happening to me.

Clarifying, I am creating a VCL form and at the time of Create the problem occurs

Hello,

Can you please clarify first, which edition and build of UniGUI are you using?!

Link to comment
Share on other sites

Version: uniGUI Complete Trial Edition 1.90.0.1509


procedure TFrmProdutosWeb.UniFormCreate(Sender: TObject);
var
  LProdutosWeb: TFrmProdutos; //VCL Form to convert in Unigui in Runtime
begin
  bBloquearCreateShowVCL := True;
//Error occurs here:  
LProdutosWeb := TFrmProdutos.Create(nil);

  LProdutosWeb.Visible := False;
  DPadraoControllerDM.View.Form := Self;
  SuspendLayouts;
  try
    Self.Caption := LProdutosWeb.Caption;
    UniServerModule.Title := Self.Caption;
    Self.Top := LProdutosWeb.Top;
    Self.Left := LProdutosWeb.Left;
    Self.Height := LProdutosWeb.Height;
    Self.Width := LProdutosWeb.Width;

    TConversorVCL2Unigui.ConverterObjetos(LProdutosWeb, Self);
  finally
    bBloquearCreateShowVCL := False;
    LProdutosWeb.FormCreate(LProdutosWeb);
    LProdutosWeb.FormShow(LProdutosWeb);
    ResumeLayouts;
    LProdutosWeb.Free;
  end;
end;


 

Link to comment
Share on other sites

  • 1 year later...
On 11/19/2019 at 1:32 PM, DiegoNBR said:

Version: uniGUI Complete Trial Edition 1.90.0.1509


procedure TFrmProdutosWeb.UniFormCreate(Sender: TObject);
var
  LProdutosWeb: TFrmProdutos; //VCL Form to convert in Unigui in Runtime
begin
  bBloquearCreateShowVCL := True;
//Error occurs here:  
LProdutosWeb := TFrmProdutos.Create(nil);

IMHO, This is a No conventional doing in unigui.

Unigui not support a pure classical Delphi VCL form.

If you want to convert your old form (vcl), then create a new unigui Project, with a new Uniform and rewrite your code, with unigui components.

Regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...