对话框后应用程序不会从 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";
}
I have this problem.
I have solved, it but does it correct for big application (in future:)?
#!/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";
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“在出现顶级窗口之前,(主)循环不会终止。”
"The ( main ) loop will not terminate until there are top level windows."