Riccardo Mottola wrote:
Hi,
1) when using "gopen xxx" NSworkspace will launch also gworkspace
automatically.
Strangely, GWorkspace now opens and asks you "are you sure you
want to
quit" ?...
2) "gopen GWorkspace" will open a double copy of it causing grief!!!
Could you be more specific what the problem here is? As far as I
understand it NSWorkspace has always relied on a workspace
application
to do most of the work. GWorkspace being the default one.
Correct.
gopen just uses this mechanism to get it's job done. So yes, starting
GWorkspace via gopen could result in it being started twice.
No gnustep application should be open twice as far as I can
understand...
The only thing you report that seems strange is that GWorkspace will
quit again. This sounds more like an GWorkspace issue.
Possibly, but it did not happen in the past. It does not quit in
the sense "crash". It asks me politely like I selected "Quit" from
the menu! Nobody else noticed that?
I finally managed to reproduce this bug and fixed it in svn. The
issue occurred (only) on machines which are slow enough for
GWorkspace needing more than 5 seconds to finish launching. The cause
of the bug is a subtle error in r29864, where NSRunAlertPanel returns
NSAlertFirstButtonReturn instead of NSAlertDefaultReturn when it is
run from a non-gui application. This was causing a SIGTERM signal
being sent to GWorkspace and a second instance of GWorkspace being
started.
Note that (thanks to some inexplicable wisdom of Apple)
NSAlertFirstButtonReturn is not equal to NSAlertDefaultReturn and
that the NSAlertXXXButtonReturn constants are meant to be used only
with the NSAlert methods, but not with the old OpenStep dialog
functions (and also not with NSAlert's alertWithMessageText:... class
method).
Incidentally, I noticed during debugging that GNUstep applications do
not respond to DO messages while in a modal dialog loop. This means
that if the user or a background application attempts to connect to a
running application while that application presents a modal dialog, a
new instance of the application is launched. If your are using
GWorkspace, just put in it into a state where it presents a modal
dialog (in the default configuration move a file do a different
folder or to the trash), then switch to a terminal and call gopen.
After a short delay when the timeout of [conn rootProxy] has expired
a new instance of GWorkspace is started. If your are not using
GWorkspace, you can use Ink instead. Open its open panel and then use
gopen -a Ink to open a rtf document. Again, after a short delay this
will start a new instance of Ink. Both behaviors are really annoying.
Of course, it is quite unlikely that a user will gopen a document
while its application is presenting a modal dialog, but this
situation could easily arise with background tools using GWorkspace
to launch applications or present documents (or just check the list
of running applications!).
Wolfgang
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev