* * *

Author Topic: Trying to Install MessageComposerPackage v0.0  (Read 1493 times)

WickedDum

  • Full Member
  • ***
  • Posts: 209
Trying to Install MessageComposerPackage v0.0
« on: September 28, 2016, 04:01:27 am »
Evening!

During my studying, I ran across the package MessageComposer.  It sounded like a great tool to incorporate as I go forward.  So, I thought I would install it!   :)
 
I have Lazarus The Complete Guide and Getting Started with the Lazarus IDE beside me and also read some of the forum posts on Installing Packages...but I still have questions...  :-[

I believe I installed the package correctly, but I see no signs of it except that it is in the list.  I'll take that as success.  (Right?)

My steps:

Open Loaded Package-> selected MessageComposerPkg.  Messagecomposer.pas and .lfm are present. 

From Use:  Do I Add to Project or Install?  Or just ignore altogether?

From Add:  Selected New Component.  From this point, I basically don't have a clue...

I have no idea what the Ancestor Type should be...

Palette Page:  Without knowing how many icons (components) there are, I don't want to overpopulate a tab that is already there.  I think it should be its own tab.

Unit File Name:  messagecompser.pas

Unit name:  MessageComposer

Icon...

Could you please assist me in my efforts to get the package installed properly?

Thank you for your time!

Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Phil

  • Hero Member
  • *****
  • Posts: 2040
Re: Trying to Install MessageComposerPackage v0.0
« Reply #1 on: September 28, 2016, 04:07:15 am »
Could you please assist me in my efforts to get the package installed properly?

Just click Compile to make sure the package's units compile okay. Then, assuming they do, click Install to rebuild the IDE. If Install is disabled, that means it's a runtime package and doesn't need to be included in the IDE itself.

That's all you need to do.


WickedDum

  • Full Member
  • ***
  • Posts: 209
Re: Trying to Install MessageComposerPackage v0.0
« Reply #2 on: September 28, 2016, 04:25:26 am »
Thanks Phil.

When I selected 'Yes" to the question: Do you want to rebuild Lazarus now?' it presented me with the following error:  "One or more required packages were not found. See package graph for details."  On the left side of the Package Graph, the lazreportpdfexport 0.8->pack_powderpdf (>=0.9.10) is highlighted.  What am I supposed to infer from that?  :o


Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Phil

  • Hero Member
  • *****
  • Posts: 2040
Re: Trying to Install MessageComposerPackage v0.0
« Reply #3 on: September 28, 2016, 04:28:50 am »
That probably means those packages need to be installed first. I'm not familiar with either one. Were they listed as required packages when you opened the other package?

WickedDum

  • Full Member
  • ***
  • Posts: 209
Re: Trying to Install MessageComposerPackage v0.0
« Reply #4 on: September 28, 2016, 04:43:48 am »
Not knowing what you are talking about, I backtracked a few screens and started over...

Package MessageComposerPkg v0.0 shows two Required PackagesIDEIntf and FCL(>=1.0).  I guess you are telling me they need to be installed first.

How do I determine if they are already installed or not?   :-[

Then, you want me to go through the same ambiguous steps for those packages that I am already fumbling around trying to follow for the MessageComposerPkg?  :o   %)

Wow...all of this just to provide me a shortcut to remembering all of the parameters for the MessageDialog....
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

howardpc

  • Hero Member
  • *****
  • Posts: 2113
Re: Trying to Install MessageComposerPackage v0.0
« Reply #5 on: September 28, 2016, 11:41:42 am »
My steps:

Open Loaded Package-> selected MessageComposerPkg.  Messagecomposer.pas and .lfm are present. 

If the package is already loaded, you have already installed it before. Nothing more to do.
Unfortunately the package is broken. It fails to correctly register an IDE shortcut, or to add an IDE menu item, so is currently useless, since its functionality cannot be invoked.

Can you add a bug report on Mantis?

WickedDum

  • Full Member
  • ***
  • Posts: 209
Re: Trying to Install MessageComposerPackage v0.0
« Reply #6 on: September 29, 2016, 05:55:13 am »
@howardpc

I found these two .pas files from my subscription to the Blaise Pascal Magazine.

Not being familiar with the process, do either of these correct the broken code you are referring to?

Excerpt from messagecomposer.pas
Code: Pascal  [Select]
  1. { Registers a keyboard shortcut and menu item in Lazarus}
  2. procedure Register;
  3. var
  4.   Key1,Key2: TIDEShortCut;
  5.   Cat: TIDECommandCategory;
  6. begin
  7.   Key1 := IDEShortCut(VK_M, [ssCtrl], VK_UNKNOWN, []);
  8.   Key2 := IDEShortCut(VK_UNKNOWN, [], VK_UNKNOWN, []);
  9.   Cat := IDECommandList.CreateCategory(Nil, cMessageComposer,
  10.                                        SMessageComposerCaption,
  11.                                        IDECmdScopeSrcEditOnly);
  12.  
  13.   CmdMessageComposer := RegisterIDECommand(Cat, cMessageComposer,
  14.                                           SMessageComposerCaption,
  15.                                           Key1, Key2,nil,
  16.                                           @ExecuteMessagesComposer);
  17.  
  18.   RegisterIDEMenuCommand(itmSourceTools, cMessageComposer,
  19.                          SMessageComposerMenuCaption,
  20.                          nil, nil, CmdMessageComposer);
  21. end;
  22.  

I can provide the full unit if you like.

Or this:

messengercomposerpkg.pas
Code: Pascal  [Select]
  1. { This file was automatically created by Lazarus. Do not edit!
  2. This source is only used to compile and install the package.
  3.  }
  4.  
  5. unit messagecomposerpkg;
  6.  
  7. interface
  8.  
  9. uses
  10.   MessageComposer, LazarusPackageIntf;
  11.  
  12. implementation
  13.  
  14. procedure Register;
  15. begin
  16.   RegisterUnit('MessageComposer', @MessageComposer.Register);
  17. end;
  18.  
  19. initialization
  20.   RegisterPackage('messagecomposerpkg', @Register);
  21. end.
  22.  

Please understand I have no problem creating a bug report, if necessary.

Thanks!!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

howardpc

  • Hero Member
  • *****
  • Posts: 2113
Re: Trying to Install MessageComposerPackage v0.0
« Reply #7 on: September 29, 2016, 10:56:12 am »
messagecomposerpkg.pas is autogenerated by Lazarus, so is irrelevant.

The snippet from messagecomposer.pas you quote gives a compileable but broken package, which as I pointed out does not correctly add either a shortcut or menu item to the IDE.

Perhaps Salvatore Coppola, the author of the package, is reading this and can fix it.

WickedDum

  • Full Member
  • ***
  • Posts: 209
Re: Trying to Install MessageComposerPackage v0.0
« Reply #8 on: November 08, 2016, 01:40:53 am »
I think I found the location for the MessageComposerPkg.lpk v0.0MessageComposer is the last menu selection under Source.

Is it showing up here instead of in the tabs?  It seems to work!

The 'problems' I have:

1-  I can't center the text easily.  And not with multiple lines, either.
2-  The default values should be modifiable but I cannot see how.

I am trying to implement a ShowMessage-type of a notice/alert that I can continually use through out my programs.

Thanks!

Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus