gerardocrisci Posted May 7, 2020 Share Posted May 7, 2020 in the example "uniGUI \ Demos \Desktop\Windowless" UniServerModule.MainFormDisplayMode = mfPage if I add to the source MainForm.OnAfterShow = UniFormAfterShow procedure TMainForm.UniFormAfterShow(Sender: TObject); begin UniMemo1.Lines.Add('--- > OnAferShow'); end; the OnAfterShow event is called 2 times. Why? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 6 minutes ago, gerardocrisci said: the OnAfterShow event is called 2 times. Hello, How do you test? Called once. Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 7, 2020 Author Share Posted May 7, 2020 58 minutes ago, gerardocrisci said: Windowless" UniServerModule.MainFormDisplayMode = mfPage ? Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 7, 2020 Author Share Posted May 7, 2020 test the example in Windowless mode .. 1 hour ago, gerardocrisci said: Why in Windowless ... is the OnAfterShow event called 2 times? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 15 minutes ago, gerardocrisci said: UniServerModule.MainFormDisplayMode = mfPage Yes Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 7, 2020 Author Share Posted May 7, 2020 7 minutes ago, Sherzod said: Yes what does it mean? Is there or isn't there an error? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 1 hour ago, Sherzod said: Called once. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 Which build are you using? Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 7, 2020 Author Share Posted May 7, 2020 uni-1.90.0.1531 but your image shows a form ... not a MainForm in Windowless look at my picture Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 1 hour ago, gerardocrisci said: TMainForm.UniFormAfterShow Ok sorry I didn't pay attention. We will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 Yes sorry, you are right. I will open a ticket in the support portal. Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 7, 2020 Author Share Posted May 7, 2020 but I think you could already understand from the title .. thanks .. good night Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2020 Share Posted May 7, 2020 Ok sorry Good night. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted May 8, 2020 Share Posted May 8, 2020 Yes, I get this bug in 1531 Trail version too. Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 8, 2020 Author Share Posted May 8, 2020 Ciao Freeman35 I need this adjustment ... in many cases I start the Query in this event .. in order to display the form first and then the request for the data for the grid. Is there a post-show event even after the AftherShow? PS: Since it cannot be obtained even by paying uniGUIForm.pas. At least is it possible to have uniGUIForm.int ? an .int file where you only see the Interface part of Unit not shipped with source, .. example of the probable file: unit uniGUIForm; interface uses Controls, Classes,...; type TUniForm = class(TUniCustomForm) private FOnReady: TNotifyEvent; .. protected function GetOnShow: TNotifyEvent; virtual; procedure OnAfterShow(Value: TNotifyEvent); override; ... public constructor Create (AOwner: TComponent); destructor Destroy; ... published property OnCreate; property OnReady; property OnBeforeShow; property OnShow; property OnAfterShow; ... end; implementation end. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8, 2020 Share Posted May 8, 2020 On 5/8/2020 at 2:11 AM, gerardocrisci said: the OnAfterShow event is called 2 times. Fixed, please wait for the next build. Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 8, 2020 Author Share Posted May 8, 2020 1 minute ago, Sherzod said: Fixed, please wait for the next build. Grazie . Also think about giving documentation in int files.. if you provide the files uniImageList.int .. uniCanvas.int .. uniGUIForm.int .. facilitates the ability to create custom components trying to create override procedures .. I will wait for a next version soon Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8, 2020 Share Posted May 8, 2020 5 minutes ago, gerardocrisci said: Also think about giving documentation in int files.. Please explain. Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 8, 2020 Author Share Posted May 8, 2020 Given that I do not understand why not have the source of all the files ... where the pas source is not provided ... give only the definition part of interface .. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted May 9, 2020 Share Posted May 9, 2020 hi @gerardocrisci quick & short way, before Farshad fix this bug, Can add this code to where trigger twice. procedure TMainForm.UniFormAfterShow(Sender: TObject); begin if Self.Tag<>0 then exit; // or use any flag UniMemo1.Lines.Add('--- > OnAferShow'); Self.Tag:= 1; end; Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted May 9, 2020 Author Share Posted May 9, 2020 procedure TMainForm.UniFormAfterShow(Sender: TObject); begin OnAfterShow := nil; UniMemo1.Lines.Add('--- > OnAferShow'); end; more simple and linear 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 10, 2020 Share Posted May 10, 2020 Yes problem in Build (1531). TMainForm.UniFormAfterShow is called 2 times when UniServerModule.MainFormDisplayMode = mfPage 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.