views:

30

answers:

2

I'm trying to use setContentBorderThickness:forEdge: to create a bottom bar in a Cocoa application.

mipadi was on to something, but in testing it out, I think maybe this is a slightly different problem:

-(void) adjustContentBorderBasedOnArrayControllerSelection{
    if(([[self.resultsArrayController selectionIndexes] count] == 0)){
        [[self window] setContentBorderThickness:40.0f forEdge:CGRectMinYEdge];
        NSLog(@"%f", [[self window] contentBorderThicknessForEdge:CGRectMinYEdge]);
    } else {
        [[self window] setContentBorderThickness:60.0f forEdge:CGRectMinYEdge];
        NSLog(@"%f", [[self window] contentBorderThicknessForEdge:CGRectMinYEdge]);
    }
}

Both of those NSLog() messages show the thickness value is 0.0 even after I explicitly set it. Anyone know what's up with that?

+1  A: 

You can use CGRectMinYEdge. (On 64-bit systems, NSMinYEdge is #define'd as CGRectMinYEdge anyway).

mipadi
A: 

By any chance have you checked to make sure [self window] isn't nil? Do you have your outlet setup right? I get that behavior if the outlet to the window isn't set.

Patrick Burleson
Dammit!**3.....
jxpx777
Happens to everyone... :-)
Patrick Burleson