Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDrawer returning large NSSize values



On Sunday, June 27, 2004, at 10:07AM, Michael Hanna <email@hidden> wrote:

>This code:
>
>
>-(void)awakeFromNib
>{
> NSUserDefaults *defaults;
> NSNumber *value;
> //NSRect drawerRect;
> NSSize aSize;
> NSView *drawerView = [bottDrawer contentView];
> aSize = [drawerView frame].size;
> //aSize = drawerRect.size;
> NSLog(@"drawerview size awake: %d, %d", aSize.height, aSize.width);

Your problem is that the fields of NSSize are floats, not ints. To print them, use the "%f" conversion specifier, not "%d".
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.