2011-12-20 51 views
1

我遇到此問題。對話後應用程序未退出MainLoop

我已經解決了,但它對於大型應用程序(未來:)是否正確?

#!/usr/bin/perl 

use strict; 
use warnings; 

use lib '.'; 
use MyApp; 
use LoginFrame; 

my $f = LoginFrame->new; 
$f->ShowModal; 
if(int($f->GetReturnCode)) { 
    print '['.$f->GetReturnCode."]\n"; 
    $f->Destroy; 

    my $app = new MyApp; 
    $app->MainLoop; 

} else { 
    print "PLEASE NOT THIS CRAP AGAIN!!!\n"; 
    print '['.$f->GetReturnCode."]\n"; 
} 

回答