Re: [Pyobjc-dev] issues with NSURL and NSWindow?
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2004-04-05 06:27:49
|
On Apr 5, 2004, at 2:18 AM, Ronald Oussoren wrote: > > On 5-apr-04, at 7:31, b.bum wrote: > >> On Apr 4, 2004, at 9:31 PM, Bob Ippolito wrote: >>> That's not the correct way of looking at it. The problem is >>> precisely that it is sending the release message to an object that >>> is not prepared to receive it. It actually does try and throw an >>> exception due to the incorrect selector, you just don't see it >>> because it does some garbage collection in the process and the world >>> ends before it gets a chance to let you know what went wrong. >> >> I disagree. >> >> Regardless of the state of the underlying object or the bridge >> between, the user is attempting to send a method to an object where >> that method does not exist. >> >> If I do the following from ObjC... >> >> [[NSURL alloc] initWithString]; >> >> ... the runtime responds with... >> >> 2004-04-04 22:28:02.775 asdfasdf[6043] *** -[NSURL initWithString]: >> selector not recognized >> 2004-04-04 22:28:02.777 asdfasdf[6043] *** Uncaught exception: >> <NSInvalidArgumentException> *** -[NSURL initWithString]: selector >> not recognized > > You get the same error with PyObjC. The only problem is that the > bridge crashes before you see the exception :-(. The bridge crashes > because it tries to -release an object that is not initialized, which > causes serious errors for some classes (such as NSURL). Yeah, I tried to explain that.. it uses dealloc now, which seems to work much better, especially for NSURL ;) -bob |