gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions on NSApplication


From: Fred Kiefer
Subject: Questions on NSApplication
Date: Mon, 11 Dec 2000 20:03:46 +0100

I am filling in the last missing pieces into NSApplication and to my
surprise found that there are some open problems left here. So before I
will commit my new code to CVS I have a question, that will help me to
understand what should go on.

It all started when I realized that the current implementation of the
[stop:] method does nothing useful for the standard case, when there is
no modal session. Than this should break out of the main event loop,
which than could be restarted by another call to [run]. Both is not the
case, only the [terminate:] message break the run loop and after that
the graphic context is destroyed, so no restart is possible. This could
be solved by replacing the implementation of [stop:] with that of
[terminate:], moving the destruction of the graphics context into the
dealloc method and implementing [terminate:] to do all the clean up
itself (call [self release] followed by exit(0)). Than to make the run
loop restartable we should also remove the nib loading from it (This is
also shown that way in the dummy example for NSApplicationMain() in the
class comment for NSApplication).
Question now: Is this the way everything should work together or did I
get something totally wrong? I did not look up the old OpenStep
documentation on that, just used the new from Apple to understand what
should be done.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]