Jump to content

Recommended Posts

Posted

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.

 



 

Posted

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,

Posted

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?

Posted

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.

Posted

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,

Posted

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.

 

???

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

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