http://bugzilla.novell.com/show_bug.cgi?id=489077
User jsmeix@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=489077#c14
--- Comment #14 from Johannes Meixner 2009-04-03 03:11:39 MDT ---
Regarding comment #13:
I find a 'Skip Refresh' button only in
yast2/library/packages/src/PackageCallbacks.ycp
where the code is:
------------------------------------------------------------------
`PushButton (`id(`skip), `opt (`cancelButton), _("Skip Refresh"))
..
symbol ui = (symbol) UI::UserInput();
------------------------------------------------------------------
For documentation see
http://forgeftp.novell.com/yast/doc/SL11.1/tdg/ButtonBox.html
and
http://forgeftp.novell.com/yast/doc/SL11.1/tdg/UserInput.html
This means that whenever a 'Skip Refresh' button is shown,
it explicitely waits directly afterwards for user input.
I.e. whenever a 'Skip Refresh' button is shown, it is never
busy with something else.
In contrast the code which leads to this bug is like:
--------------------------------------------------------------------
`PushButton( `id(`foo), _("Foo") )
..
DoSomethingWhichMayTakeUnexpectedlyMuchTime();
..
symbol ui = (symbol) UI::UserInput();
--------------------------------------------------------------------
As long as it is in the DoSomethingWhichMayTakeUnexpectedlyMuchTime
function, it will not respond to a click on [Foo].
When the author knows it may take much time the code is:
--------------------------------------------------------------------
`PushButton( `id(`foo), _("Foo") )
..
Popup::ShowFeedback( _("Doing Foo. Please wait...") );
DoSomethingWhichIsKnownThatItMayTakeMuchTime();
sleep( 1000 );
Popup::ClearFeedback();
..
symbol ui = (symbol) UI::UserInput();
--------------------------------------------------------------------
When the author knows it takes much time in any case the code is:
--------------------------------------------------------------------
`PushButton( `id(`foo), _("Foo") )
..
Popup::ShowFeedback( _("Doing Foo. Please wait...") );
DoSomethingWhichIsKnownToTakeMuchTime();
Popup::ClearFeedback();
..
symbol ui = (symbol) UI::UserInput();
--------------------------------------------------------------------
But a code like
--------------------------------------------------------------------
`PushButton( `id(`interrupt), _("Interrupt") )
..
DoSomethingWhichIsKnownThatItMayTakeMuchTime();
..
if( `interrupt == (symbol) UI::UserInput() ) exit;
--------------------------------------------------------------------
cannot work because clicking [Interrupt] is ignored
until DoSomethingWhichIsKnownThatItMayTakeMuchTime
had actually finished.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.