Jump to content

messagedlg


jahlxx

Recommended Posts

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.

 



 

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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.

 

???

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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...