Hi,

I have tried to use the following method for disallowing more than one instance of the application to run:

sub OnInit {
#...

$self->{instance_checker} = Wx::SingleInstanceChecker->new();
if ($self->{instance_checker}->IsAnotherRunning) {
return 0;
}
}

But it doesn't work and I can open more instances of the program.

In the chm wxWidgets documentation I've read that I need to send a name as a parameter of
Wx::SingleInstanceChecker->new();

but if I do that, WxPerl gives an error:

Usage: Wx::SingleInstanceChecker::new(CLASS)

I have also read that this method works under Windows and Linux, so it should work, because I use Windows XP.

Octavian

Reply via email to