(Please, can somebody verify if I'm actually subscribed (with the address
on this mail) to all the lists? Here I've made some changes on the
imago.ro computers to leave one of them free to install OPENSTEP on
it; but now I'm not sure if I've moved all the users well...)
I'm trying to get an istance of a running application to see if it
isRunning and to set the value of the "Status:" label of the Processes
window.
Im doing so:
NS_DURING
{
theApp = [NSConnection
rootProxyForConnectionWithRegisteredName: appName
host: @""];
}
NS_HANDLER
{
theApp = nil;
}
NS_ENDHANDLER
if (theApp != nil)
{
if ([theApp isRunning])
{
appStatus = @"running";
}
else
{
appStatus = @"stopped";
}
}
but i get "Uncaught exception NSGenericException, reason: method isRunning
not implemented".
The interesting think is that if I implement in an app - (BOOL)isRunning
(returning YES), all works!
>From gdb:
#0 0x406c4111 in __kill ()
#1 0x40698f7b in raise (sig=6) at signals.c:63
#2 0x406c5447 in abort () at ../sysdeps/generic/abort.c:88
#3 0x4040e56b in _NSFoundationUncaughtExceptionHandler
(exception=0x81f3478)
at NSException.m:42
#4 0x4040eb04 in _i_NSException__raise (self=0x81f3478, _cmd=0x404fe698)
at NSException.m:110
#5 0x403eb8a0 in decoder (argnum=-1, datum=0xbfffe560,
type=0x805cd16 "C8@0:4", flags=0) at NSConnection.m:3797
#6 0x403c742c in mframe_build_return_opts (argframe=0xbfffe7c8,
type=0x805cd16 "C8@0:4", out_parameters=0 '\000', decoder=0xbfffe6d0,
pass_pointers=0 '\000') at mframe.m:1419
#7 0x403c770b in mframe_build_return (argframe=0xbfffe7c8,
type=0x805cd16 "C8@0:4", out_parameters=0 '\000', decoder=0xbfffe6d0)
at mframe.m:1533
#8 0x403ebf36 in
_i_NSConnection_GNUstepExtensions_forwardForProxy_selector_argFrame_
(self=0x81b7e20, _cmd=0x405045f0, object=0x8275688, sel=0x80631c0,
argframe=0xbfffe7c8) at NSConnection.m:3811
#9 0x4040b2e3 in _i_NSDistantObject_GNUstepExtensions_forward__ (
self=0x8275688, _cmd=0x8071880, aSel=0x80631c0, frame=0xbfffe7c8)
at NSDistantObject.m:868
#10 0x80595a9 in __objc_forward (object=0x8275688, sel=0x80631c0,
args=0xbfffe7c8) at ../../../gcc-2.95.2/libobjc/sendmsg.c:569
#11 0x805939d in __objc_word_forward (rcv=0x8275688, op=0x80631c0)
at ../../../gcc-2.95.2/libobjc/sendmsg.c:509
#12 0x804df09 in _i_Processes__setApplicationInfo_ (self=0x81a8bd8,
_cmd=0x8063028, sender=0x82764d0) at processes.m:211
#13 0x40452f61 in _i_NSObject__performSelector_withObject_
(self=0x81a8bd8,
_cmd=0x40248f88, aSelector=0x8063028, anObject=0x82764d0)
at NSObject.m:1067
#14 0x400a2466 in _i_NSApplication__sendAction_to_from_ (self=0x8129d08,
_cmd=0x4025ad88, aSelector=0x8063028, aTarget=0x81a8bd8,
sender=0x82764d0)
at NSApplication.m:1287
#15 0x400e8e27 in _i_NSControl__sendAction_to_ (self=0x82764d0,
_cmd=0x4026a570, theAction=0x8063028, theTarget=0x81a8bd8)
at NSControl.m:372
#16 0x40123477 in _i_NSMatrix__sendAction_to_ (self=0x82764d0,
_cmd=0x402541b0, theAction=0x0, theTarget=0x0) at NSMatrix.m:1582
#17 0x400cf983 in _i_NSCell__trackMouse_inRect_ofView_untilMouseUp_ (
self=0x8233ea0, _cmd=0x4026a608, theEvent=0x8263d98, cellFrame={origin
= {
x = 0, y = 0}, size = {width = 366, height = 20}},
controlView=0x82764d0, flag=0 '\000') at NSCell.m:1009
#18 0x40123ca8 in _i_NSMatrix___mouseDownNonListMode_ (self=0x82764d0,
_cmd=0x4026a6f8, theEvent=0x81f0550) at NSMatrix.m:1707
#19 0x4012478f in _i_NSMatrix__mouseDown_ (self=0x82764d0,
_cmd=0x4028a998,
theEvent=0x81f0550) at NSMatrix.m:1867
#20 0x401a9c3f in _i_NSWindow__sendEvent_ (self=0x81b6cc0,
_cmd=0x40248f18,
theEvent=0x81f0550) at NSWindow.m:2286
#21 0x400a1ef1 in _i_NSApplication__sendEvent_ (self=0x8129d08,
_cmd=0x40248ca8, theEvent=0x81f0550) at NSApplication.m:1210
#22 0x400a05a8 in _i_NSApplication__run (self=0x8129d08, _cmd=0x8062520)
at NSApplication.m:872
#23 0x804c10d in main (argc=1, argv=0xbffff384, env=0xbffff38c) at
main.m:22
#24 0x406bdcb3 in __libc_start_main (main=0x804bfb8 <main>, argc=1,
argv=0xbffff384, init=0x804bb74 <_init>, fini=0x805a5e4 <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffff37c)
at ../sysdeps/generic/libc-start.c:78