Re: [Pipmak-Devel] errorMessage in pipmak_platform on UNIX
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2005-07-16 11:43:13
|
> In pipmak_windows.c and pipmak_macosx.m the function errorMessage > displays a Box containing the message. Don't do this on UNIX platforms! > Print the error message on the console (actually write them to the > stderr stream): > > The reason why: This function is only needed for messages that occur > before the graphical console is ready. On windows you have only to call > a simple function from windows.h to display a dialogbox, which works in > nearly every situation. On UNIX you have to connect to the x-server in > order to display something like a message box. So it is a difficult and > error prone way to get the message box (unlike in windows). SDL also > connects to the x-server and initialises a window (and afterwards the > graphical console can be used). If an error occurs because the window > couldn't be initialised, trying to show a messageBox will fail too. That's OK for me. Just take the implementation from pipmak_dummyplatform.c (actually it could be changed to use stderr instead of stdout there as well). > Anyway, UNIX users like to have error messages printed to stderr. I'm not so sure about that. It certainly applies to the majority of Linux users two years ago, but will it also apply to the majority of Linux users two years from now? People who start an application from a graphical desktop will never see error messages on stderr (unless they specifically go and look for them in the console log, which requires that they know about its existence in the first place). Anyway, I agree that having errorMessage() print to stderr is sufficient for Pipmak, considering that it's only used in few exceptional cases. The deluxe solution, of course, would be to try displaying a graphical dialog and only resort to stderr if that fails as well. -Christian |