Lazarus

Miscellaneous => Suggestions => IDE/CodeTools => Topic started by: HPF_BR on October 30, 2008, 03:43:32 pm

Title: Message Dialog
Post by: HPF_BR on October 30, 2008, 03:43:32 pm
Would be nice if lazarus IDE can have a Message Dialog like Gexperts.org
Title: RE: Message Dialog
Post by: theo on October 30, 2008, 04:19:03 pm
You mean like this? http://z.about.com/d/delphi/1/0/J/3/gexmsg.gif
Yes, why not.
Title: RE: Message Dialog
Post by: HPF_BR on October 30, 2008, 07:41:37 pm
Yes, it could speed up coding.
Title: RE: Message Dialog
Post by: Vincent Snijders on October 31, 2008, 09:48:54 am
Install lazarus/components/messagecomposer/messagecomposerpkg.lpk
Title: Message Dialog
Post by: JanRoza on November 02, 2008, 12:55:00 am
Vincent,

I followed your tip and installed the messagecomposer package.
But after installation I cannot find the component anywhere.
How do you use it when it's instaled in Lazarus?

 :?:
Jan
Title: Message Dialog
Post by: JanRoza on November 02, 2008, 02:12:54 am
Forget my last question, I found it.
Great addition, glad you pointed it out.

  :D
Jan
Title: Re: Message Dialog
Post by: Epigear on September 26, 2011, 01:18:38 pm
Forget my last question, I found it.
Great addition, glad you pointed it out.

  :D
Jan

I did install the Messagedlg and I also found the the menu entry that allows access to it. But: what unit do you have to include for the compiler to recognize the Messagedlg (and Showmessage) functions? When I try to compile the compiler gags at these functions.

Jan
Title: Re: Message Dialog
Post by: m.vincent on September 26, 2011, 02:01:18 pm
In Delphi it was "Dialogs" - is it not the same in Lazarus?

Mike
Title: Re: Message Dialog
Post by: Epigear on September 27, 2011, 03:07:35 pm
I have the Dialogs unit included, but no luck. Any ideas?
Title: Re: Message Dialog
Post by: Leledumbo on September 28, 2011, 06:34:41 am
Quote
I have the Dialogs unit included, but no luck. Any ideas?
What does the compiler say? They're really there, see this (http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/index-5.html).
Title: Re: Message Dialog
Post by: JD on September 28, 2011, 10:44:13 am
Hi there,

I just discovered this. Wow! I did not even know it existed in Lazarus. I'm used to using GExperts in Delphi and I'm glad to know that after installing the package, a simple Ctrl+M launches it in Lazarus. It's a real time saver.

Great work guys!  :D
Title: Re: Message Dialog
Post by: Epigear on September 28, 2011, 11:23:51 am
Quote
I have the Dialogs unit included, but no luck. Any ideas?
What does the compiler say? They're really there, see this (http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/index-5.html).

The compiler says: Error: identifier not found "Messagedlg"

I'm porting from Delphi 7. Could it be that it is looking at the Delphi 'Dialogs', I'm now realising.
Title: Re: Message Dialog
Post by: Blaazen on September 28, 2011, 11:52:33 am
No idea. If I put "Dialogs" to uses section then MessaageDlg works (and always worked).
Title: Re: Message Dialog
Post by: Leledumbo on September 29, 2011, 03:49:57 am
Quote
I'm porting from Delphi 7. Could it be that it is looking at the Delphi 'Dialogs', I'm now realising.
Shouldn't matter, as the project won't search Delphi one (normally). Do you have LCL as dependency? What if you ctrl+click that 'dialogs' in uses clause? Does it open LCL dialogs unit?
Title: Re: Message Dialog
Post by: sfeinst on September 29, 2011, 06:33:57 pm
The compiler says: Error: identifier not found "Messagedlg"

Is that a typo when you copied the error message or is that the actual error message?  Because I thought it should be MessageDlg not Messagedlg.
Title: Re: Message Dialog
Post by: Leledumbo on September 30, 2011, 08:35:17 am
Quote
Is that a typo when you copied the error message or is that the actual error message?  Because I thought it should be MessageDlg not Messagedlg.
Should be no different, Pascal is case insensitive remember?
Title: Re: Message Dialog
Post by: sfeinst on September 30, 2011, 04:17:54 pm
Quote
Is that a typo when you copied the error message or is that the actual error message?  Because I thought it should be MessageDlg not Messagedlg.
Should be no different, Pascal is case insensitive remember?

See what happens when you are in the middle of a Java project.  All reasonable thought leaves your head.   %)
Title: Re: Message Dialog
Post by: Epigear on October 01, 2011, 01:56:47 am
Quote
I'm porting from Delphi 7. Could it be that it is looking at the Delphi 'Dialogs', I'm now realising.
Shouldn't matter, as the project won't search Delphi one (normally). Do you have LCL as dependency? What if you ctrl+click that 'dialogs' in uses clause? Does it open LCL dialogs unit?

When I CTRL click the dialogs in the uses clause it opens the Free Pascal dialogs unit, which does not have a Messagedlg function. So it seems to be a path problem.
What do you mean by "Do you have LCL as dependency?"?

Cheers,

Jan
Title: Re: Message Dialog
Post by: Epigear on October 01, 2011, 04:19:02 am
Quote
I'm porting from Delphi 7. Could it be that it is looking at the Delphi 'Dialogs', I'm now realising.
Shouldn't matter, as the project won't search Delphi one (normally). Do you have LCL as dependency? What if you ctrl+click that 'dialogs' in uses clause? Does it open LCL dialogs unit?

When I CTRL click the dialogs in the uses clause it opens the Free Pascal dialogs unit, which does not have a Messagedlg function. So it seems to be a path problem.
What do you mean by "Do you have LCL as dependency?"?

Cheers,

Jan

OK, I have set in the Project options paths to lcl, lcl\include, lcl\units. Now my project compiles until the final end, where I get a stream of error messages saying "JanBxl.dpr(57,1) Error: Undefined symbol: WSRegisterCustomImageList" and so on with a whole lot of other similar messages. So I tried to make the compiler look in the lcl\widgetset directory, but that doesn't work. Now what?
I'm clearly a newbie, but it doesn't seem to make a lot of sense to me that you have to set all these search paths at the project level. Am I missing something?

Cheers,

Jan
Title: Re: Message Dialog
Post by: Leledumbo on October 01, 2011, 08:22:29 am
Quote
When I CTRL click the dialogs in the uses clause it opens the Free Pascal dialogs unit, which does not have a Messagedlg function
You open dialogs unit of Free Vision package (Turbo Pascal's Turbo Vision compatible package). If you have LCL as dependency, this should not happen (it'll open LCL dialogs unit instead).
Quote
OK, I have set in the Project options paths to lcl, lcl\include, lcl\units
NOOOO..!!! NEVER EVER DO THAT! It's in the FAQ AFAIK, please read it.
Quote
What do you mean by "Do you have LCL as dependency?"?
Open project inspector, open dependencies tab, look for LCL in the drop down and add (unless it's already there).
Quote
JanBxl.dpr(57,1) Error: Undefined symbol: WSRegisterCustomImageList
Add Interfaces to the uses clause in .lpr file.
Title: Re: Message Dialog
Post by: Epigear on October 01, 2011, 09:40:35 am
Quote
When I CTRL click the dialogs in the uses clause it opens the Free Pascal dialogs unit, which does not have a Messagedlg function
You open dialogs unit of Free Vision package (Turbo Pascal's Turbo Vision compatible package). If you have LCL as dependency, this should not happen (it'll open LCL dialogs unit instead).
Quote
OK, I have set in the Project options paths to lcl, lcl\include, lcl\units
NOOOO..!!! NEVER EVER DO THAT! It's in the FAQ AFAIK, please read it.
Quote
What do you mean by "Do you have LCL as dependency?"?
Open project inspector, open dependencies tab, look for LCL in the drop down and add (unless it's already there).
Quote
JanBxl.dpr(57,1) Error: Undefined symbol: WSRegisterCustomImageList
Add Interfaces to the uses clause in .lpr file.

Since I posted I've been reading up on the Help, and saw that setting those paths wasn't supposed to be OK. So I removed them, but now I'm back to square 1: the dialogs unit is the Free Pascal (or Free Vision) one, and things don't compile.

When I open Project Inspector, I don't see a Dependencies tab, and no drop down list. I have attached what I get to see.

Cheers,

Jan
Title: Re: Message Dialog
Post by: Leledumbo on October 01, 2011, 02:58:28 pm
OK, looks like I should be very clear here. From your image, it's clear that it doesn't have LCL dependency. On the page, dependencies are listed below "Required packages" node. Now, to add one, press "+" button and move on to "New Requirement" tab, the drop down is named "Package Name". Look for "LCL" and click "OK", done. Now you should see it's listed below "Required packages" and try recompiling. Hope it works now.
Title: Re: Message Dialog
Post by: Epigear on October 02, 2011, 12:01:10 am
Thanks a million: now it compiles. The only thing I have to work out now is why Excel crashes on this version whille it works fine with the Delphi 7 version  :(
Title: Re: Message Dialog
Post by: Leledumbo on October 02, 2011, 05:07:36 am
Quote
The only thing I have to work out now is why Excel crashes on this version whille it works fine with the Delphi 7 version
Happy debugging :D
If you think it's a bug, feel free to trim down the project to a very minimal version and report it to the bugtracker.