Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: MessageDlg doesn't open dialog on Mac unless...


This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Oct 1, 2014 11:04 AM Last Post By: Grant Beattie
Grant Beattie

Posts: 77
Registered: 11/29/01
MessageDlg doesn't open dialog on Mac unless...  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 10:00 AM
PC guy writing a FM application that works on a PC and for the most part on Mac. I noticed today that the MessageDlg() boxes don't show unless I set Link With Runtime Packages is TRUE. Is this a requirement??

What happens is the appl gets hung waiting for the response from the MessageDlg but as a user in front of the Mac you can't see it and you can't navigate to it any way that I could find.

On the PC I always preferred to bloat my own app rather than deal with a bunch of external DLLs and such, hence my first choice to not link with runtimes.

At the moment I'm using Command Line Tools 10.8.5 connected to a Macbook Pro OS X 10.8.5. I have a couple of other SDKs as well that I can verify this with if needed.
Eli M

Posts: 1,346
Registered: 11/9/13
Re: MessageDlg doesn't open dialog on Mac unless...  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 10:05 AM   in response to: Grant Beattie in response to: Grant Beattie
Are you using the new non blocking version or the original MessageDlg? Do have a map or web browser control on your form that the MessageDlg is hidden behind?

MessageDlg('Do you want to press yes or no?', System.UITypes.TMsgDlgType.mtInformation,
        [
          System.UITypes.TMsgDlgBtn.mbYes, System.UITypes.TMsgDlgBtn.mbNo
        ], 0,
        procedure(const AResult: TModalResult)
        begin
          case AResult of
            { Detect which button was pushed and show a different message }
            mrYes:
              begin
                // pressed yes
              end;
            mrNo:
              begin
               // pressed no
              end;
          end;
        end
        );
Grant Beattie

Posts: 77
Registered: 11/29/01
Re: MessageDlg doesn't open dialog on Mac unless...  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 10:10 AM   in response to: Eli M in response to: Eli M
I'm using the original MessageDlg() with params for only msg text, msg type, the buttons and help context (which is 0). Even if I was using the new one you should be able to see it, non?

My first question in this quest was to see if it was a requirement for runtime packages, because if it is, then I don't need to research further...

I don't have a web browser control and I don't even know what a map is but I don't have one.

I just tested with SDK 10.8.3 and 10.7.4 and it's the same behaviour. Works ok only as long as link with runtime packages is true.

---

Edited by: Grant Beattie on Oct 1, 2014 10:16 AM
Eli M

Posts: 1,346
Registered: 11/9/13
Re: MessageDlg doesn't open dialog on Mac unless...
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 10:27 AM   in response to: Grant Beattie in response to: Grant Beattie
In XE7 I stuck that code in a button on a form and deployed it to MacInCloud (10.8.5). MessageDlg worked okay there. I do not have link with runtime packages checked.
Grant Beattie

Posts: 77
Registered: 11/29/01
Re: MessageDlg doesn't open dialog on Mac unless...  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2014 10:40 AM   in response to: Eli M in response to: Eli M
Eli M wrote:
In XE7 I stuck that code in a button on a form and deployed it to MacInCloud (10.8.5). MessageDlg worked okay there. I do not have link with runtime packages checked.

Well good news, bad news. I get the same behaviour with a new form ... but I'm using C++Builder. Oops wrong forum. Anyway this was my button click code:

//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
int choice;
 
choice = MessageDlg("Do you want to save your changes?", TMsgDlgType::mtConfirmation,
TMsgDlgButtons() << TMsgDlgBtn::mbYes << TMsgDlgBtn::mbNo << TMsgDlgBtn::mbCancel, 0);
}
//---------------------------------------------------------------------------


I'll try it on Delphi and if that works OK then I'll move this question to the other forum.

FWIW:
- CBuilder XE6 exhibits the same behaviour ... in this case using SDK 10.8.3.
- CBuilder XE5 again works OK if link w runtimes=true but in this case it doesn't even startup on the Mac with runtimes false.

---

Edited by: Grant Beattie on Oct 1, 2014 11:01 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02