core/ui separation

Paulo Jorge Guedes Paulo.Guedes at artelecom.pt
Thu May 18 11:09:34 BST 2006


> -----Original Message-----
> From: Carsten Pfeiffer [mailto:carsten.pfeiffer at first.fraunhofer.de]
> Sent: quinta-feira, 18 de Maio de 2006 10:55
> To: kde-core-devel at kde.org
> Subject: Re: core/ui separation
> 
> On Thursday 18 May 2006 11:19, Stephan Kulow wrote:
> 
> > > > because even now the non-GUI code is not GUI free as there are
> > > > KMessageBox uses when errors occur. And of course it's GUI
dependent
> as
> > > > it uses KIO.
> [...]
> > But if your core has MessageBoxes, you screwed it anyway :)
> 
> The UI is also screwed, if the core already does the error handling
and
> doesn't tell the UI about it.

Yes, I think this situation of KIO having message boxes and not
communicating with the GUI, is very broken and we should find some way
to fix this for KDE 4
> 
> What about throwing exceptions and letting the UI show the
messageboxes?
> :-]

Exceptions wouldn't solve the need for a login dialog for example.
We could use the approach from Java, what they call a callback handler:
http://java.sun.com/j2se/1.4.2/docs/api/javax/security/auth/callback/Cal
lbackHandler.html

> Or, if we don't want to use exceptions, have some other means of error
> propagation, like an abstract ErrorHandler being passed around. That
would
> get ugly, though.

See above.

> As a last resort, KNotify could be used for displaying errors. Or did
> KNotifyClient (or whatever it's called right now) end up in kdeui by
now?
> 
> Cheers,
> Carsten

Paulo




More information about the kde-core-devel mailing list