Hi,
is this a system error or I'm doing something wrong?

In IB place a custom NSView onto a NSWindow and make sure there is a good sized 
border between the view and the edges of the window.

In the size pane of the inspector set all the struts and springs so the view 
will resize with the window.

This is my drawing code inside the application delegate. 
myViewObj is an IBOutlet to the custom view which contains no code other than 
the standard initWithFrame and drawRect templates.

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
        CALayer * zCALayerRoot = [CALayer layer];
        [self.myViewObj setLayer: zCALayerRoot];
        [self.myViewObj setWantsLayer:YES];
                
        self.myViewObj.layer.backgroundColor = 
CGColorCreateGenericRGB(0.0,0.0,0.0,1.0);
}

When we risize the window by dragging on the resize handle everything works as 
expected 
unless we
1. resize upwards until the view's rectangle disappears.
When the window is resized the top of the view will have moved upwards but the 
lower border is unaffected. 

2. resize by moving the rightmost edge  of the window to the right until the 
view disappears.
When the window is resized the right hand side of the view will have moved to 
the right.
Again the left border is unaffected.

XCode 3.2.6  OSX 10.6.8

Julius

http://juliuspaintings.co.uk



_______________________________________________

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

Reply via email to