aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-08-04 01:13:17 +0200
committerMax <post@wickenrode.com>2015-08-04 01:13:17 +0200
commitde84dc3f4beaa370d1a8bfe02df41cfe450f59b2 (patch)
treec8314b33df32cf5f0060baed34c8828eb9e99746
parent9728737f9b695147e3957f401cc254f49afe7c6d (diff)
downloadsequelpro-de84dc3f4beaa370d1a8bfe02df41cfe450f59b2.tar.gz
sequelpro-de84dc3f4beaa370d1a8bfe02df41cfe450f59b2.tar.bz2
sequelpro-de84dc3f4beaa370d1a8bfe02df41cfe450f59b2.zip
Add some debugging code to track down the elusive _scrollViewDidChangeBounds: issue
-rw-r--r--Source/SPObjectAdditions.m31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/SPObjectAdditions.m b/Source/SPObjectAdditions.m
index f8b0278e..4f2eef1e 100644
--- a/Source/SPObjectAdditions.m
+++ b/Source/SPObjectAdditions.m
@@ -42,4 +42,35 @@
return (self == null);
}
+- (void)_scrollViewDidChangeBounds:(id)obj
+{
+ NSMutableString *msg = [NSMutableString string];
+
+ [msg appendFormat:@"%s tripped!\n\n",__PRETTY_FUNCTION__];
+
+ [msg appendFormat:@"passed object (class <%@>): %@\n\n",[obj className],obj];
+
+ if([obj isKindOfClass:[NSView class]]) {
+ [msg appendString:@"View hierarchy:\n"];
+ id parent = obj;
+ while(parent) {
+ [msg appendFormat:@"- (class <%@>): %@, id=%@, tag=%ld\n",
+ [obj className],
+ obj,
+ [(NSView *)obj identifier],
+ [(NSView *)obj tag]];
+ parent = [parent superview];
+ }
+ [msg appendString:@"\n"];
+ }
+
+ if([obj respondsToSelector:@selector(window)]) {
+ [msg appendFormat:@"In Window: %@\n\n",[obj window]];
+ }
+
+ [msg appendFormat:@"self: %p (class <%@>)\n\n",self,[self className]];
+
+ @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:msg userInfo:nil];
+}
+
@end