From: Allison N. <dem...@ma...> - 2009-02-14 20:55:50
|
I don't have any good ideas as to what is going wrong, except to say that it would appear to me that the injection of class methods is not the real problem, it's a red-herring. you can see in the trace that they are correctly called, and they return without any obvious problems, so I'm guessing the real problem is elsewhere. What happens if you remove either the definition of the function, the call to objc_class_method, or both? Does it still work, or does it hang? Have you tried implementing the class in Objective-C to see what happens (this would at least make sure that you are returning reasonable values from your functions, if it works in obj-c). I'm wondering about that 0 that you return for canInitWithRequest: isn't that function supposed to return a boolean, hence false, rather than 0? Ummm, apart from that, I'm not too familiar with NSURLProtocol, so I can't offer up any special insight to the actual implementation :-) Le 14 févr. 09 à 20:35, Steve Conover a écrit : >>> objc_class_method(:canInitWithRequest_, '@:@@') >>> def self.canInitWithRequest(ns_url_request) >>> p" canInitWithRequest" >>> 0 >>> end |