title: NSToolbar shown when entering fullscreenmode
body: <p>I am developing an app in which the toolbar can be shown/hide by the user using a button. The problem is the following: <strong>If the user chooses to hide the toolbar and then enters the fullscreen mode, the toolbar is shown.</strong></p>
  
  <p>The user interface has been created programmatically (i.e. not using Interface Builder).</p>
  
  <p>This is the toolbar creation in the app delegate:</p>
  
  <pre><code>mainToolbar = [[NSToolbar alloc] initWithIdentifier:MAIN_TOOLBAR];
  [mainToolbar setAllowsUserCustomization:NO];
  [mainToolbar setDisplayMode:NSToolbarDisplayModeIconOnly];
  [mainToolbar setDelegate:self];
  [window setToolbar: mainToolbar];
  </code></pre>
  
  <p>These are the actions performed by the buttons:</p>
  
  <pre><code>-(void)hideToolbar {
      editing = YES;
      [mainToolbar setVisible:NO];
  }
  
  -(void)showToolbar {
      editing = NO;
      [mainToolbar setVisible:YES];
  }
  </code></pre>
  
  <p>I have tried to fix it using window delegate methods but still the toolbar is shown when entering full screen mode regardless the value of <code>editing</code>.</p>
  
  <pre><code>- (void)windowDidEnterFullScreen:(NSNotification *)notification {
    [mainToolbar setVisible:!editing];
  </code></pre>
  
  <p>}</p>
  
  <pre><code>- (void)windowDidExitFullScreen:(NSNotification *)notification {
   [mainToolbar setVisible:!editing];
  </code></pre>
  
  <p>}</p>
  
  <p>Many thanks in advance!</p>