I'm having no luck getting a subview to display. In the awakeFromNib of the controller I have this:

        helpView = [[MyView alloc] init];
        [helpView setFrameOrigin:RectCentre( [theView frame] )];
        [helpView setFrameSize:NSZeroSize];
        [theView addSubview:helpView];

(RectCentre is a function that finds the centre of a rectangle.) In the help button action I have this:

        [[helpView animator] setFrameSize:[theView frame].size];
        [helpView setNeedsDisplay:YES];

(I'm sure the button connection is set in IB.) Finally, in the drawRect: method of MyView I have this:

        [[NSColor colorWithCalibratedRed:1.0 green:1.0 blue:0.8 alpha:0.9]
                set];
        [NSBezierPath fillRect:[self bounds]];
        [NSBezierPath strokeRect:[self bounds]];

When I press my Help button, all I see is a small patch of colour appearing briefly in the main view.

theView does have animation layers. Would this make a difference?

dkj
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to