[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: poseAs: problem
From: |
Chris B . Vetter |
Subject: |
Re: poseAs: problem |
Date: |
Thu, 30 Aug 2001 16:00:10 -0700 |
On Thu, 30 Aug 2001 16:20:25 -0600
Adam Fedor <fedor@doc.com> wrote:
> Chris B. Vetter wrote:
> That's an interesting set of problems. Are you doing poseAs: in gdnc or
> in another program?
> Behaps you can debug gdnc. It's not obvious how to do this. Hopefully
> you've compiled the base library with make debug=yes, then:
> defaults write NSGlobalDomain debug YES
> Then use gdb:
> gdb gdnc
> > run
> Then do whatever you did to crash gdnc, then type a 'bt' in gdb.
All I do is 'openapp MyApp.app' ...
No, I'm not meddling with gdnc (that is, directly). Basically, what
I do is (in AppController.m)
- (void) applicationDidFinishLaunching: (NSNotification *) aNotification
{
if([[appPreferences objectForKey: @"UseMyClass"]
isEqualToString: @"YES"])
[MyClass setup];
return;
}
and in MyClass.m
+ (id) setup
{
[self poseAs: [NSObject class]];
return self;
}
I also tried [[self class] poseAs: [NSObject class]]; - same result.
The actual setup is done later, not in +setup. I do, however, replace
objc_error with my own error handler.
Interestingly, if I use [Object class] instead, everything works but
that's not what I had in mind originally, so is not of much use.
>From playing around and using NSLog() a lot, I could trace the problem
to the -poseAs: call.
First, I will get a timeout warning, then gdnc crashes - and, as I
said, after restarting gdnc by hand (starting any application, which
_should_ automatically re-start gdnc will NOT work) I get that "no
runtime info for MyClass" message until I remove Cache/:0.0
Maybe I should do the actual setup BEFORE calling -poseAs: ...
--
Chris