• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDrawer delegate function mis-described?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDrawer delegate function mis-described?


  • Subject: Re: NSDrawer delegate function mis-described?
  • From: "Ben Kennedy" <email@hidden>
  • Date: Tue, 28 Jan 2003 00:19:35 -0500
  • Organization: Zygoat Creative Technical Services

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@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.

  • Follow-Ups:
    • Re: NSDrawer delegate function mis-described?
      • From: Shaun Wexler <email@hidden>
References: 
 >Re: NSDrawer delegate function mis-described? (From: Shaun Wexler <email@hidden>)

  • Prev by Date: Re: Saving data
  • Next by Date: Setting the Default Browser?
  • Previous by thread: Re: NSDrawer delegate function mis-described?
  • Next by thread: Re: NSDrawer delegate function mis-described?
  • Index(es):
    • Date
    • Thread