jahlxx Posted April 13, 2016 Posted April 13, 2016 Hi. messagedlg, shows in server side, not in client side. what am I doing wrong? thanks. Quote
BantuKumar Posted April 13, 2016 Posted April 13, 2016 Could you paste your code snippet here how/where you are showing message dialog? Quote
jahlxx Posted April 13, 2016 Author Posted April 13, 2016 hi. in a unibutton onclick event: messagedlg('ERROR', mterror, [mbok], 0); <- this shows the message in the server side showmessage('ERROR'); <- this shows the message in the client side showmessage has less funcionalility than messagedlg. Quote
BantuKumar Posted April 14, 2016 Posted April 14, 2016 hi. in a unibutton onclick event: messagedlg('ERROR', mterror, [mbok], 0); <- this shows the message in the server side showmessage('ERROR'); <- this shows the message in the client side showmessage has less funcionalility than messagedlg. Hi, Yes ShowMessage(...) is has lesser functionality than MessageDlg. Please use following syntax instead of what you are using for MessageDlg. MessageDlg('ERROR', mtError, [mbOk], nil); Hope this will be helpful. Regards, Quote
jahlxx Posted April 14, 2016 Author Posted April 14, 2016 Thanks but not works. The compiler raise an error, nill is not allowed. I've tried with null, but the app raise an error at runtime: variant value not correct. any other idea? Quote
ZigZig Posted April 14, 2016 Posted April 14, 2016 What about "nil" with only one "n" (just like BantuKumar wrote) ? BTW, what is your uniGUI version ? Quote
jahlxx Posted April 14, 2016 Author Posted April 14, 2016 sorry. with only one 'l' do you mean? is a mistake of the message here. in my code is with one L not with 2. my version is the last trial version. Quote
Administrators Farshad Mohajeri Posted April 14, 2016 Administrators Posted April 14, 2016 From which module are you trying to call MessageDlg? Quote
jahlxx Posted April 14, 2016 Author Posted April 14, 2016 I don't understand. I call it from a form, after validate user input. Quote
Sherzod Posted April 14, 2016 Posted April 14, 2016 Hi, Can you try analyze this demo, works for you?!: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\Dialogs Best regards. Quote
estrify Posted April 14, 2016 Posted April 14, 2016 hi. in a unibutton onclick event: messagedlg('ERROR', mterror, [mbok], 0); <- this shows the message in the server side showmessage('ERROR'); <- this shows the message in the client side showmessage has less funcionalility than messagedlg. Hi,I think this is related to a simple namespace problem. This messagedlg you indicate is executing a Dialogs.MessageDlg function, not unigui's one... Look at example suggested by Delphi Developer... Regards, Quote
jahlxx Posted April 18, 2016 Author Posted April 18, 2016 Hi. I've a .pas file, thart works as library in my projects, with procedures and variables that I use in other forms in the application. I have in that .pas file this procedure: procedure error(mensaje : string);begin if trim( mensaje) <> '' then begin ShowMessage(uppercase(mensaje)); end;end; When I call showmessage directly from any other form, it works, but when I call lib.error('error'), the message window appears in server side. I don't know why. ??? Quote
jahlxx Posted April 18, 2016 Author Posted April 18, 2016 ok. I think is solved. instead to have a .pas only file, now I have a form, ans use it as my "library". and now works, calling the function from a unigui form. the problem now, is that the form that contains the function, always is shown when I call a function that is in that form. Quote
jahlxx Posted April 19, 2016 Author Posted April 19, 2016 when I call showmessage from a unigui form, it works ok. but when I call showmessage from a unit, a .pas file not associated to a unigui form, it seems that the app call to the message window like a vcl application. in a prior message in this topic, I see something about namespaces. can someone clarify this to me? thanks. Quote
Administrators Farshad Mohajeri Posted April 19, 2016 Administrators Posted April 19, 2016 Please add uniGUIDialogs to uses. Make sure VCL.Dialogs is not in the uses list. Quote
jahlxx Posted April 19, 2016 Author Posted April 19, 2016 ok. done. but now, showmessage does nothing. nothing is showed. Quote
Administrators Farshad Mohajeri Posted April 19, 2016 Administrators Posted April 19, 2016 Please paste your code which calls ShowModal here. Quote
Sherzod Posted April 19, 2016 Posted April 19, 2016 Hi, If I understand correctly you, then your module should to be something like this: unit lib; interface uses SysUtils, UniGUIDialogs; procedure error(mensaje : string); implementation procedure error(mensaje : string); begin if trim( mensaje) <> '' then begin ShowMessage(uppercase(mensaje)); end; end; end. Best regards. Quote
jahlxx Posted April 19, 2016 Author Posted April 19, 2016 yes. I've isolated the error procedure in other unit called lib2. lib2.pas, is exactly as your code, and does nothing. no message appears. Quote
Sherzod Posted April 19, 2016 Posted April 19, 2016 Then, Pls can you make a small testcase?! and Delphi, UniGUI version? Thanks. Quote
jahlxx Posted April 19, 2016 Author Posted April 19, 2016 ok. more tests. Removing vcl.Dialogs and adding UniGUIDialogs to the uses list, works in all the forms of the application (I've tested in a few of them). The only form from does not work, as I can see, is from the uniloginform. From the loginform, calling to lib.error procedure, does nothing. Quote
jahlxx Posted April 19, 2016 Author Posted April 19, 2016 I use delphi xe4, and my unigui version is the last commercial version Quote
ZigZig Posted April 19, 2016 Posted April 19, 2016 Could you please post a full project (in a zip file)? Without that, it is very difficult to understand where is your issue... Quote
jahlxx Posted April 20, 2016 Author Posted April 20, 2016 Ok. I've got it. How can I upload the sample project? Quote
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.