Commits

Brandon Walkin  committed bfd6023

Bottom Bars - fixed issue causing "unrecognised selector" console output

  • Participants
  • Parent commits 2fb30fc

Comments (0)

Files changed (4)

File BWAddMiniBottomBar.m

 
 - (void)drawRect:(NSRect)aRect
 {
-	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
+	if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)] && [[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
 	
 	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])

File BWAddRegularBottomBar.m

 
 - (void)drawRect:(NSRect)aRect
 {
-	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
+	if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)] && [[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
 	
 	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])

File BWAddSheetBottomBar.m

 
 - (void)drawRect:(NSRect)aRect
 {
-	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
+	if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)] && [[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
 	
 	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])

File BWAddSmallBottomBar.m

 
 - (void)drawRect:(NSRect)aRect
 {
-	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
+	if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)] && [[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
 	
 	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])