Skip navigation.
 
mlRe: NSDrawer delegate function mis-described?
FROM : Ben Kennedy
DATE : Tue Jan 28 06:19:35 2003

Shaun, thanks for the help.  I've been able to solve my problem (at least
so far, it seems) by adjusting windowDidResize as thus:

- (void) windowDidResize:(NSNotification*)note
   {
   float windowHeight = [[note object] frame].size.height;
   float minus = [drumsDrawer contentSize].height + [drumsDrawer
leadingOffset] + 39;

   [drumsDrawer setTrailingOffset:(windowHeight - minus)];

   return;
   }

and (the other key part) setting the minContentSize of my drawer in IB to
1.  By setting the window minimum size to a reasonable value (bigger than
the drawer), the drawer's contentSize will remain constant.

I'm a bit leery about the magic constant 39, but that's what I came up
with from calculating ([window frame].size.height - [drawer
leadingOffset] - [drawer contentView].size.height - [drawer
trailingOffset]) via an NSLog() with the window in its smallest
permissible size.  And it works.

Mildly off-topic, what is NSDrawerWindow?  I realise that in your code,
the notification object calling -[DrawerToggle windowDidResize:] is
sometimes an NSDrawerWindow* instead of an NSWindow*.  I thought the
drawer's parent window is the window to which it's attached, which began
life as an NSWindow...?

-ben

--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlNSDrawer delegate function mis-described? Ben Kennedy Jan 27, 22:46
mlRe: NSDrawer delegate function mis-described? Douglas Davidson Jan 27, 23:15
mlRe: NSDrawer delegate function mis-described? Ben Kennedy Jan 28, 00:19
mlRe: NSDrawer delegate function mis-described? Shaun Wexler Jan 28, 01:07
mlRe: NSDrawer delegate function mis-described? Shaun Wexler Jan 28, 01:18
mlRe: NSDrawer delegate function mis-described? Ben Kennedy Jan 28, 01:33
mlRe: NSDrawer delegate function mis-described? Ben Kennedy Jan 28, 01:35
mlRe: NSDrawer delegate function mis-described? Scott Anguish Jan 28, 05:42
mlRe: NSDrawer delegate function mis-described? Ben Kennedy Jan 28, 06:19
mlRe: NSDrawer delegate function mis-described? Shaun Wexler Jan 28, 07:40