Re: [lazarus] TApplication.Terminate

2005-10-25 Thread Alain Michaud
Hi,

  I had the same problem a while ago. There were some discussions on
this list and this seems to be a deep bug. 

In my case, I noticed that any timer runing would not stop. 

Finally I found the ultimate weapon: I send the kill command to the
shell. 

1 -find the PID of your program 
2 - send exec(kill pid);

(something like that. I can give you the exact code if you want)

It works! 

Alain

On Tue, 2005-10-25 at 18:23 +0300, Alexander Todorov wrote:
 Hi all,
 I've been porting from Delphi for some time and noticed that
 TApplication.Terminate doesn't behave in the same manner. As the
 comment in the source say :
 -
TApplication Terminate
Class is terminated and the component engine is shutdown
 -
 
 Is it really killing the application or just shutting down the gui system ?
 How do I stop the Application running immediately ?
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TApplication.Terminate

2005-10-25 Thread A.J. Venter
On Tuesday 25 October 2005 17:42, Alain Michaud wrote:
 Hi,

   I had the same problem a while ago. There were some discussions on
 this list and this seems to be a deep bug.

 In my case, I noticed that any timer runing would not stop.

 Finally I found the ultimate weapon: I send the kill command to the
 shell.

 1 -find the PID of your program
 2 - send exec(kill pid);
  
 (something like that. I can give you the exact code if you want

 It works!
I've had the same bug, but I think THAT answer lacks a certain elegance as an 
interim measure, I chose to remember some of my old pascal, and my close 
handlers look like this:
{Insert code to try and cleanup as much as possible here}
application.terminate;
halt;

The halt command of course is technically a pascal command but it DOES seem to 
work. The only thing I'm not sure of is what it actually DOES under linux, 
hopefully it uses signals. I do know that it's alternative form 
[halt(status:integer);] is apparently the only way to set an exit status 
(granted that is more commonly needed for commandline than GUI apps however).

Ciao
A.J.


-- 
80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so.
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com
http://www.silentcoder.co.za

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TApplication.Terminate

2005-10-25 Thread Vincent Snijders

A.J. Venter wrote:

On Tuesday 25 October 2005 17:42, Alain Michaud wrote:


Hi,

 I had the same problem a while ago. There were some discussions on
this list and this seems to be a deep bug.

In my case, I noticed that any timer runing would not stop.

Finally I found the ultimate weapon: I send the kill command to the
shell.

1 -find the PID of your program
2 - send exec(kill pid);

(something like that. I can give you the exact code if you want

It works!


I've had the same bug, but I think THAT answer lacks a certain elegance as an 
interim measure, I chose to remember some of my old pascal, and my close 
handlers look like this:

{Insert code to try and cleanup as much as possible here}
application.terminate;
halt;

The halt command of course is technically a pascal command but it DOES seem to 
work. The only thing I'm not sure of is what it actually DOES under linux, 
hopefully it uses signals. I do know that it's alternative form 
[halt(status:integer);] is apparently the only way to set an exit status 
(granted that is more commonly needed for commandline than GUI apps however).





I rather see a good example with a bug report, so that the deep bug can 
be fixed.


Of course this can be 'wrong' use of Application.Terminate too, but an 
example can show that too.


Vincent.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TApplication.Terminate

2005-10-25 Thread Alexander Todorov
I know kill will work but that's a dirty solution. And it doesn't work
on Windows (in fact there should be some api call to do the same :) )
Halt seems more clear.
I will try to make a good example app and send a bug report.

Maybe some common solution should be added to the Wiki.

Thanks all.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Changing the drawgrideditor

2005-10-25 Thread dhkblaszyk
Hi there,

I need to change the default editor in a drawgrid to a picklist. Can
anybody give me a source example how to acompilsh this depending on column
and row of the selected cell??

Kind regards, Darius Blaszijk

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives