MessageDlg?

Sorry my question may be so lame..
I was using
MessageDlg('This will delete your xxxxx file. Are you sure?',
   mtError, mbOKCancel, 0); 

Now i get 2 errors with this.

E2003 Undeclared identifier: 'mtError'
E2250 There is no overloaded version of 'MessageDlg' that can be called with these arguments

What is the new way of asking for confirmation, i could use MessageBox but its Modal propert is not working well with FireMonkey.
I want the user respond to the message first before doing something on main app.
0
xuxu
9/15/2011 10:21:16 PM
embarcadero.delphi.firemonkey 4901 articles. 4 followers. Follow

5 Replies
8195 Views

Similar Articles

[PageSpeed] 48

> {quote:title=xuxu xuxu wrote:}{quote}
> Sorry my question may be so lame..
> I was using
> MessageDlg('This will delete your xxxxx file. Are you sure?',
>    mtError, mbOKCancel, 0); 
> 
> Now i get 2 errors with this.
> 
> E2003 Undeclared identifier: 'mtError'
> E2250 There is no overloaded version of 'MessageDlg' that can be called with these arguments
> 
> What is the new way of asking for confirmation, i could use MessageBox but its Modal propert is not working well with FireMonkey.
> I want the user respond to the message first before doing something on main app.

Here you go

MessageDlg('This will delete your xxxxx file. Are you sure?', TMsgDlgType.mtError, mbOKCancel, 0);

What you do is Control Click MessageDlg. This will show you the source code. Then you can find the Type.

Edited by: Ralph Wesseling on Sep 15, 2011 4:44 PM
0
Ralph
9/15/2011 11:45:06 PM
> {quote:title=xuxu xuxu wrote:}{quote}
> Sorry my question may be so lame..
> I was using
> MessageDlg('This will delete your xxxxx file. Are you sure?',
>    mtError, mbOKCancel, 0); 
> 
> Now i get 2 errors with this.
> 
> E2003 Undeclared identifier: 'mtError'
> E2250 There is no overloaded version of 'MessageDlg' that can be called with these arguments
> 
> What is the new way of asking for confirmation, i could use MessageBox but its Modal propert is not working well with FireMonkey.
> I want the user respond to the message first before doing something on main app.

Scoped enums is on by default for the FireMonkey framework. This means that everytime you use an enumerated type you must prefix the enumerated value with the type name. 

There should be a help topic about Scoped Enums.
0
Jeremy
9/16/2011 1:35:20 AM
"Jeremy North" wrote in message news:401356@forums.embarcadero.com...

> Scoped enums is on by default for the FireMonkey framework. This means 
> that everytime you use an enumerated > type you must prefix the enumerated 
> value with the type name.

Why is this? It looks very awkward to me.

Dan
0
Daniel
9/16/2011 2:11:27 AM
> Here you go
> 
> MessageDlg('This will delete your xxxxx file. Are you sure?', TMsgDlgType.mtError, mbOKCancel, 0);
> 
> What you do is Control Click MessageDlg. This will show you the source code. Then you can find the Type.
> 
> Edited by: Ralph Wesseling on Sep 15, 2011 4:44 PM

Thanks a lot.
0
xuxu
9/16/2011 4:46:51 AM
> Why is this? It looks very awkward to me.

Maybe because of an over-zealous language purist that forgot that 
computer languages are intended for humans, and not just to aim for 
abstract cosmetics goals?

Yes, it's results in a complete readability mess as soon as you have 
more than one enum involved, like in a set.

Eric
2
Eric
9/16/2011 7:01:13 AM
Reply:

Similar Artilces:

Ann: FastReport FMX for Delphi XE3 (FireMonkey 2) and XE2 (FireMonkey) released
Dear friends, Visual report designer is available now on both MS Windows and MAC OS X! Full sources. We can write here full list of possibilities, but it will so long. Let see FastReport VCL and FastReport FMX comparison table: http://www.fast-report.com/en/products/comparison-fast-report-firemonkey-vcl.html And all of this - just now in your hands for business-applications for Mac. Report generator FastReport FMX is the first multiplatform solution for including Business Intelligence into software based on Embarcadero FireMonkey IDE (Delphi for MS Windows and Apple Mac OS X)...

Ann: X-platform report generator for Delphi XE3 (FireMonkey 2) and XE2 (FireMonkey) released
Dear friends, Visual report designer is available now on both MS Windows and MAC OS X! Full sources. We can write here full list of possibilities, but it will so long. Let see FastReport VCL and FastReport FMX comparison table: http://www.fast-report.com/en/products/comparison-fast-report-firemonkey-vcl.html And all of this - just now in your hands for business-applications for Mac. Report generator FastReport FMX is the first multiplatform solution for including Business Intelligence into software based on Embarcadero FireMonkey IDE (Delphi for MS Windows and Apple Mac OS X)...

Making Firemonkey more compatible with Delphi
I have programmed in Delphi since 1995 Delphi1 I am now evaluating Delphi XE4. It boggles my mind, why embarcadero has lost the most important aspects of Delphi. Simplicity and Fast User Interface creation. I can easily see how Firemonkey can be improved to bring it in line with traditional Delphi Techniques by doing the following. 1. All Firemonkey controls need a data aware counterpart. 2. Firemonkey Styles need to be converted to TControl descendants. 3. ie. TLayout goes to TPanel ( TFMXPanel ) 4. ie. TRectangle does to TFrame TFMXFrame ) 5. LiveBindings gets placed un...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Positioning MessageDlg on Firemonkey (iOS)
My iOS app displays a popup message using the MessageDlg function. How to center this message on top of the main application form? I have tried the usual trick of centering it using the following technique of applying Position to it (found it on the web): {code} function TForm4.MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Integer): Integer; var Dialog: TForm; begin Dialog := CreateMessageDialog(Msg, DlgType, Buttons); try self.InsertComponent(Dialog); Dialog.Position := TFormPosition.poMainFormCenter; Result := Dialog.Sh...

Delphi XE2, OSX and FireMonkey?
1. Does anyone know if developing with FireMonkey will be the only way to develop for OSX with XE2? 2. Does anyone know if you will need to compile on a Mac for OSX, or will XE2 cross compile? I know this will all come out during the world tour, but I'm just trying to get some idea so I can start planning. 1. Yes, I think for now it will be the only way. But you can probably build a native UI for OSX by directly using the API, like you can also develop Win32 applications without using the VCL. 2. XE2 will only be available for Windows, but it will compile for other platforms. &l...

Delphi FireMonkey project / testComplete and MSAA
Hi I am actualy working on a new team project developped using FireMonkey. We want to create automated tests with TestComplete which is already used to run tests on some VCL projects. Unfortunatly, we discovered that TestComplete is not directly compatible with FireMonkey application, it only sees the windows but not the controls on it. Making some research we, found that TestComplete is able to identify controls thanks to MSAA. So we created a really short project (only one form with some controls) using the FireMonkey Accessibility Pack in order to look at TestComplete's behavio...

Delphi XE5 Firemonkey iOS7 Style (where is it?)
It says here http://www.embarcadero.com/products/rad-studio/whats-new that XE5 has "iOS 7 SDK support and style" Where is the iOS7 style? - All I can see is iOS6 style components. I can compile on iOS7 and it will bring up the keyboard in iOS 7 but none of the drag and drop components from firemonkey are iOS7 style. Am I missing something obvious? > {quote:title=David Templar wrote:}{quote} > It says here http://www.embarcadero.com/products/rad-studio/whats-new that XE5 has "iOS 7 SDK support and style" > > Where is the iOS7 style? - All I can see is...

ANN: Delphi XE2 FireMonkey BOOK
September 5, 2012 Coogara Consulting is pleased to announce that our new book is available: "FireMonkey Development for iOS and OS X with Delphi XE2" by Graeme Chandler. It is available printed (comb binding) or in PDF and MOBI (Kindle compatible) formats. Only from: http://shop.coogara.com Regards Graeme Chandler Coogara Consulting http://www.coogara.com.au http://shop.coogara.com http://www.strikingwood.com.au Graeme Chandler wrote: > Coogara Consulting is pleased to announce that our new book is > available: > > "FireMonkey Dev...

Pop-up on Mobile apps (FireMonkey / Delphi )
Hi everyone, I'm currently working on a FireMonkey mobile app with Delphi (XE6) and since i'm really new to this i'm in need of a little bit of help. For my App i'd like to build in a subscription screen that would work like a pop-up, showing modal on the same form than the login. I've been looking around a bit on the internet but couldn't find any usefull advice. I found a video ("FireMonkey: Showing Modal form with animation and Shadow effect" from Yaroslav Brovin) thad proved me that it was possible, but was unable to find how. I'm sure it'...

Delphi, Firemonkey, IOS, and TCP howto?
I was really excited about the new ability to compile IOS apps written in Delphi, but I'm starting to find some major limitations, unless I'm really overlooking something. I want to write an iphone/pad app that needs to retrieve data from a socket connection, or from a webpage (http, webservice, anything). It seems that all of the Firemonkey internet and indy components are not supported within xcode. Am I overlooking something here, or is this a feature that will not be implemented, or is it planned to be implemented? If this kind of communication is not supported, this is a hu...

Delphi XE6 & Firemonkey unusable on my laptop
Hi all, I just bought XE6, solely with FireMonkey and tablet development in mind. However, it's practically unusable on my laptop & I wondered if anyone had encountered (& fixed) the solution. It affects compiled apps _and_ the XE6 IDE & design surface too. It's rather hard to explain, but it seems to be a screen refresh issue. I put together some screen cap gifs to show the problem & also some screen grabs to show machine config: http://imgur.com/a/qhVBG I have not had this problem in any other app, and indeed VCL development is fine (although not what ...

MessageDlg returns incorrect values
Am I going nuts? According to the help, MessageDlg supposedly returns the button that was hit, and I have every reason to believe it did before. But now it is not working correctly. I was so confused I started a brand new Win32 VCL app, dropped a button on the main form, wrote the following for the button's Click handler, and the problem still exists - try it and see. procedure TMainForm.Button1Click(Sender: TObject); var response: Integer; begin response := MessageDlg('Settings changed - Save?', mtWarning, [mbYes, mbNo, mbCancel], 0); if response = I...

A little bit about FireMonkey and Delphi XE2 @andreanolanusse
A little bit about FireMonkey and Delphi XE2 http://www.andreanolanusse.com/en/a-little-bit-about-firemonkey-and-delphi-xe2/ -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ...

Is there a plan to rewrite the Delphi IDE using FireMonkey ?
I guess this should be a logical move to target multiple platforms and prove that Embarcadero is eating its own dog food. Although I think I've read somewhere that Delphi is using some Microsoft technology for the form designer but I might be wrong there. Is FireMonkey suitable for that kind of application or is the VCL still the way to go for "professional" business oriented applications ? What are your thoughts ? When XE2 is released I hope there will be a clear indication as to what kind of applications FireMonkey is suitable for or not. <John Riche> wrote in message...

Web resources about - MessageDlg? - embarcadero.delphi.firemonkey

How to get Android 4.4.x style for your XE7 dialog boxes
David I’s (David Intersimone) Embarcadero blog about programming, languages, databases, history, and more.

Resources last updated: 12/26/2015 1:21:16 AM