delagoutte Posted December 3, 2019 Share Posted December 3, 2019 is there a simple method that can be used to follow the user activity in my unigui app. a thing like that exist ? proecdure TUniMainModule.onReceiveMessage(ComponentClicked : tuni....) begin if ComponentClicked.classname = tunibutton then log(ComponentClicked.ownerForm+ComponentClicked.name+self.usr_name); end Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 5, 2019 Author Share Posted December 5, 2019 no idea ? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 5, 2019 Share Posted December 5, 2019 Do you want to track all clicks, etc? Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 6, 2019 Author Share Posted December 6, 2019 21 hours ago, Hayri ASLAN said: Do you want to track all clicks, etc? yes and no, i would like a generic method exposed by unigui that catch all click,etc and in this function i could apply a "filter " for log like that : if event = click on the unibutton and if this name is BtnSave in form MyOwnForm then log(....) 1 Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 9, 2019 Share Posted December 9, 2019 Hi, You can use UniGUIMainModuleHandleRequest, You can see eventname, objectname etc. procedure TUniMainModule.UniGUIMainModuleHandleRequest(ASession: TObject; var Handled: Boolean); begin if TUniGUISession(ASession).IsAjax then begin // TUniGUISession(ASession).ARequest.Params end; end; Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 9, 2019 Author Share Posted December 9, 2019 thanks you, i'll try to analyze this Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 11, 2019 Author Share Posted December 11, 2019 ok i begin my test but when i receive this : Ajax=1 IsEvent=1 Obj=ODC1 Evt=click this=ODC1 _S_ID=d83z78cTeL105218AE6 _seq_=3a how can i find the relation between "ODC1" and my delphi object ? Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 16, 2019 Author Share Posted December 16, 2019 unigui probably does this correspondence table somewhere but we don't have access to unigui's "low level" sources code. So, I can't search for myself, that's why I'm asking for help. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 16, 2019 Share Posted December 16, 2019 We will add a function to get the component from JSName. Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 17, 2019 Author Share Posted December 17, 2019 a big thanks to the unigui team Quote Link to comment Share on other sites More sharing options...
delagoutte Posted January 14, 2020 Author Share Posted January 14, 2020 i see that there is the new version v1.90.0.1515 without this feature. Do you think that this feature could be in the next release Quote Link to comment Share on other sites More sharing options...
delagoutte Posted January 29, 2020 Author Share Posted January 29, 2020 I see the versions scrolling without this new function.(today 1518) I will need this evolution during our next "agile sprint". Do you think this new function will be released soon and if not do you have a way to unlock me in the meantime? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 29, 2020 Share Posted January 29, 2020 Hello, We managed to get the component. Please find attached MainModule.pas and check it.MainModule.pas 1 Quote Link to comment Share on other sites More sharing options...
delagoutte Posted February 3, 2020 Author Share Posted February 3, 2020 thanks a lot Quote Link to comment Share on other sites More sharing options...
delagoutte Posted April 17, 2020 Author Share Posted April 17, 2020 so i use this code : procedure TUniMainModule.UniGUIMainModuleHandleRequest(ASession: TObject; var aObject :TObject; OurComponent :TComponent; OurForm :TComponent; Event : string; begin if (ASession<>nil) then begin if (TUniGUISession(ASession).IsAjax) then begin try aObject:= TUniGUISession(ASession).FindObject(TUniGUISession(ASession).ARequest.Params.Values['obj']); Event := TUniGUISession(ASession).ARequest.Params.Values['evt']; if (aObject <> nil) then begin OurComponent:= TExtObject(aObject).AttachedComponent; // form name, control name, event name, classname of component addActivityLog(OurComponent.Owner.Name,OurComponent.Name,Event,OurComponent.ClassName); end; except end; end; end; end; i have a problem with UnimenuItem. with this code, for itemmenu, i have a OurComponent.name that is empty and classname = TUniMenuControl. how can i do for having the name of the items on the menu ? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 17, 2020 Share Posted April 17, 2020 6 hours ago, delagoutte said: so i use this code : procedure TUniMainModule.UniGUIMainModuleHandleRequest(ASession: TObject; var aObject :TObject; OurComponent :TComponent; OurForm :TComponent; Event : string; begin if (ASession<>nil) then begin if (TUniGUISession(ASession).IsAjax) then begin try aObject:= TUniGUISession(ASession).FindObject(TUniGUISession(ASession).ARequest.Params.Values['obj']); Event := TUniGUISession(ASession).ARequest.Params.Values['evt']; if (aObject <> nil) then begin OurComponent:= TExtObject(aObject).AttachedComponent; // form name, control name, event name, classname of component addActivityLog(OurComponent.Owner.Name,OurComponent.Name,Event,OurComponent.ClassName); end; except end; end; end; end; i have a problem with UnimenuItem. with this code, for itemmenu, i have a OurComponent.name that is empty and classname = TUniMenuControl. how can i do for having the name of the items on the menu ? Hi, Can you please create a test case that we can work on it? 1 Quote Link to comment Share on other sites More sharing options...
delagoutte Posted April 20, 2020 Author Share Posted April 20, 2020 Test case join to this message. launch project : click on button : ok click on a item on the menu of menubutton -> ko the name of control is empty Logger.zip Quote Link to comment Share on other sites More sharing options...
delagoutte Posted April 27, 2020 Author Share Posted April 27, 2020 Hello Hayri ASLAN, Had you got any time to check my test case ? have you got a fix ? Quote Link to comment Share on other sites More sharing options...
delagoutte Posted May 4, 2020 Author Share Posted May 4, 2020 Hello, Could you check the test case ? could you find the problem ? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted May 4, 2020 Share Posted May 4, 2020 49 minutes ago, delagoutte said: Hello, Could you check the test case ? could you find the problem ? Hi, Yes, we checked and we are not assigning attachedcomponent on the core side. We will add it in the next build so your code will continue to work. Quote Link to comment Share on other sites More sharing options...
delagoutte Posted May 5, 2020 Author Share Posted May 5, 2020 thanks, i'm waiting this with impatience 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 5, 2020 Share Posted May 5, 2020 1 hour ago, delagoutte said: thanks, i'm waiting this with impatience Bonjour Delagoutte, Ca a l'air très intéressant. j'adhère à l'idée Quote Link to comment Share on other sites More sharing options...
delagoutte Posted May 5, 2020 Author Share Posted May 5, 2020 oui on a mis en place cette méthode couplé avec loggerpro + un appender pour écrire dans une base de données. En rajoutant le numéro de session et autres infos sur le navigateur, l'OS... ca permet d'avoir de la data qui devrait être exploitable pour déterminer les fonctions utilisées dans notre logiciel. y a juste ce "bug" sur les popupmenu mais sinon pour le reste(bouton, grille, panel....) ca marche bien Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted May 5, 2020 Share Posted May 5, 2020 super ! On apprend tous les jours... Quote Link to comment Share on other sites More sharing options...
delagoutte Posted June 8, 2020 Author Share Posted June 8, 2020 On 5/4/2020 at 3:13 PM, Hayri ASLAN said: Hi, Yes, we checked and we are not assigning attachedcomponent on the core side. We will add it in the next build so your code will continue to work. Hello Hayri ASLAN, Could you confirm me that this bug will be fixe in the next release ? 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.