On Mar 11, 2010, at 4:24 PM, Gideon King wrote: > (following on from the thread "How to debug this error on closing a > document?", but it's really moved on to a new topic at this point) > > I was not aware that poseAsClass is not available in 64 bit applications. I > looked at the Apple example of exchanging a method in NSWindow, and it looked > easy enough, so I tried the method exchanging by using class-dump to generate > the header for NSConcreteNotification, and implemented the switch, but it > gives a linker error: > > "_OBJC_CLASS_$_NSConcreteNotification", referenced from: > l_OBJC_$_CATEGORY_NSConcreteNotification_$_MethodReplacement in > MyConcreteNotification.o > __objc_classrefs__d...@0 in MyConcreteNotification.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > > So it must be in the foundation binary, but the linker doesn't pick it up. Is > there a way around this?
On iPhone and 64-bit Mac, the linker enforces internal classes more strictly. NSConcreteNotification is private, so you can't link to it or subclass it. You can still get the class via runtime introspection like NSClassFromString(), which for debugging purposes ought to be good enough. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com