Wilton Ergon Posted November 14, 2021 Share Posted November 14, 2021 I'm having trouble creating dynamic menus running on the hyperserver, when application runs as standalone, no problem occurs, someone is going through it, this also only occurs when the menu is created in a frame, and pointed to a tunimenubutton, when the menu is created on a form, not the problem. I will try to create an example for support simulate this, the problem started after I put to run on hyperserver, I continue using the version 1552 i noticed several errors in the browser console, this does not occur in stand alone mode (in host location) my code function in mainmodule! PROCEDURE TUniMainModule.MontaArvoreLocalizacao(Menu:TuniMenuItem;somenteAtivos:boolean;selectreport:string); var MenuRelatorio:TUniMenuItem; qPastas:TMSQuery; BEGIN try qPastas :=TMSQuery.Create(UniApplication); qPastas.Connection :=UniMainModule.dbsmain; qPastas.close; qPastas.SQL.Text :=selectreport; qPastas.Open; MenuRelatorio :=TuniMenuItem.Create(UniApplication); MenuRelatorio.Caption :='-'; UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1; MenuRelatorio.Name :='MenuItem'+IntToStr(UniMainModule.Global_ContadorMenu); UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1; Menu.Add(MenuRelatorio); UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1; while not qPastas.Eof do Begin MenuRelatorio :=TuniMenuItem.Create(self);//UniApplication); MenuRelatorio.Caption :=qPastas.FieldByName('modulo').AsString+'| Qtde:'+qPastas.FieldByName('REG').AsString; MenuRelatorio.Name :='MenuItem'+IntToStr(UniMainModule.Global_ContadorMenu); UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1; menurelatorio.Hint :=IIF(somenteAtivos,'1','0'); MenuRelatorio.OnClick :=ExecClickRelatorioMenu; menurelatorio.Hint :='MODULO'; MenuRelatorio.Tag :=0; Menu.Add(MenuRelatorio); qPastas.Next; End; finally freeandnil(qpastas); end; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 15, 2021 Share Posted November 15, 2021 6 hours ago, wilton_rad said: I will try to create an example for support simulate this Okay, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.