In the treeview example, there is a sub-window for setting indentation
properties.
The terminate method for this window has:

sub IndentWin_Terminate {
    $IndentWin->Hide();
    $Window->Enable();
    $Window->SetForegroundWindow();
}

As is, if you terminate this window by clicking the "X" icon on the
top-right corner of
this dialog, then you can no longer bring back this window again.
i.e., try: "Options|Set indent.." again, and the main window will freeze...

Looking around, I found that if the terminate method also does:

sub IndentWin_Terminate {
    $IndentWin->Hide();
    $Window->Enable();
    $Window->SetForegroundWindow();
    $Window->Tree->SetFocus();
    return 0;
}

then everything is ok.

WIhtout resetting the focus, the main window gets frozen.
Wihtout returning 0 explicitly, this window cannot be brought up again.

Maybe someone can explain what's going on here?
This is merely circumstancial evidence.

-- Nicolas.


Reply via email to