• 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: Toggle drawer from the menu with a multi-document program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle drawer from the menu with a multi-document program


  • Subject: Re: Toggle drawer from the menu with a multi-document program
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Wed, 6 Oct 2004 13:06:39 -0700

Hello...

You could create an action method in your NSDocument subclass that toggles the drawer's opened/closed state, for example

- (void)toggleDrawerState:(id)sender
{
/* ... */
}

Then in your MainMenu.nib, you would add a new action method toggleDrawerState: to the "First Responder" proxy , and then connect your menu item to "First Responder" and its new "toggleDrawerState:" action. You can add actions to the "First Responder" proxy the same way you would add them to a class you are creating in InterfaceBuilder.

<file:///Developer/Applications/Interface Builder.app/Contents/Resources/English.lproj/InterfaceBuilder_Help/CocoaClass/chapter_5_section_3.html#//apple_ref/doc/uid/20001745/BBCBJCDH>



Hope that helps,

Louis


Is it possible to have a command from the menu to toggle the currently focused document? I am created a multi-document application which has a drawer. I have managed to add a button which can toggle the drawer. However, with the two different nibs (MyDocument and MainMenu), it seems that the MainMenu cannot directly communicate with the NSDrawer in the MyDocument nib. Is there a way to get around this so I can have a command in the menu to toggle the drawer? This is my preferred way of doing things since the button in the main window interface is purely temporary.

Chad Armstrong


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: Re: Help With NSURLConnection Authentication
  • Next by Date: Re: AuthorizationExecuteWithPrivileges
  • Previous by thread: Help with pixellated NSTIFFRepresentation issues much appreciated
  • Next by thread: Re: AuthorizationExecuteWithPrivileges
  • Index(es):
    • Date
    • Thread