[Lazarus] JEDI code formatting

Bernd Kreuss prof7bit at googlemail.com
Sat Feb 13 04:41:59 CET 2010


Hi list,

I have a problem hard to understand (for me), and hard to explain.
I am writing a win32 application to let me quickly open files and
folders; i'm going to place it in the quick launch bar near "start",
so that with one click I get the (XML configurable) list of objects.
I do not show the main form, but only the popup menu, right there
where I clicked.
If I can click something on the list, a TProcess will take care of
opening that file.
If I do not click anything within 5 seconds or if I click somewhere
else, the application shall close itself.

The main problem is this:
- if I hoover with the mouse on one of the objects shown on the popup
without clicking, after 5 seconds the application closes correctly
- if I hoover somewhere else (for example on "Cancel", using my
attached example) without clicking, the popup closes, but the
application does not. And then I have to kill the process.

What I really do not understand is that I can get it to work, i.e.
application closing, only by adding the lines

//**** here is the trick
      showmessage('Timed out');
  //**** end of the trick

that you can see in the UnitMain.pas

Can anyone explain me this behaviour? Besides, what is the right way
to have the application close itself after the popup.close(), without
the trick?

Thanks a lot,

  Roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnitMain.pas
Type: application/octet-stream
Size: 2706 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100212/6259e370/attachment-0016.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TryPopup.lpi
Type: application/octet-stream
Size: 7024 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100212/6259e370/attachment-0017.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TryPopup.lpr
Type: application/octet-stream
Size: 425 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100212/6259e370/attachment-0018.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnitMain.lfm
Type: application/octet-stream
Size: 593 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100212/6259e370/attachment-0019.obj>


More information about the Lazarus mailing list