Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 931873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:34:25+00:00 2026-05-15T20:34:25+00:00

This is what I got so far. – (IBAction)HUDPanelDictionaryHide:(id)sender{ extern NSPanel HUDPanelDictionary; [HUDPanelDictionary close];

  • 0

This is what I got so far.

- (IBAction)HUDPanelDictionaryHide:(id)sender{
    extern NSPanel HUDPanelDictionary;
     [HUDPanelDictionary close];
}

This obviously does NOT work.

The HUDPanelDictionary is declared in a separate .h and .m file for an .xib file. I need to close this panel from the other .h and .m file for another .xib file. Sorry I’m being so vague!

Any ideas??

Elijah

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:34:25+00:00Added an answer on May 15, 2026 at 8:34 pm

    You need to #import the header containing the declaration of HUDPanelDictionary.

    For example:

    #import "HUDPanelDictionary.h"
    
    @interface MyController
    
    - (IBAction)hideDictionaryPanel:(id)sender {
        [HUDPanelDictionary close];
    }
    
    @end
    

    I would also name things differently, for example “DictionaryHUD” rather than “HUDPanelDictionary.” “Panel” is redundant with “HUD,” and you should care more about its intent than its position in the class hierarchy.

    Another thing I would do is make DictionaryHUD an NSWindowController subclass, and have it expose a singleton shared instance rather than use a global variable to point to the panel itself. Then the code above would look like this:

    #import "DictionaryController.h"
    
    @interface MyController
    
    - (IBAction)hideDictionaryPanel:(id)sender {
        [[DictionaryController sharedDictionaryController] hideDictionaryPanel:sender];
    }
    
    @end
    

    This puts the primary responsibility for your dictionary panel/HUD on an instance of a single controller class, to which other controllers (say one that manages your main window’s toolbar) can forward their interactions. You could even put the dictionary HUD window controller in the responder chain to have it automatically handle actions like -hideDictionaryPanel: so nothing needs to do that kind of forwarding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got this far: :~ curl -u username:password -d status=new_status http://twitter.com/statuses/update.xml Now, how can
Here is what I've got so far.. I'm using this as a keybind. I
So this is as far as I got. Before I spend days throwing darts
I post this previously in Adobe Forum but haven't got any answers so far.
I got this far: ProcessStartInfo procInfo = new ProcessStartInfo(@C:\a\a.exe); procInfo.CreateNoWindow = true; procInfo.Arguments =
I'm a beginner at setting up spring web-applications. I got this far but now
I am trying to rebuild this with pure css. And I've got this far.
I am trying to write a currying decorator in python. I got this far:
I got this far... here is my code: - (void)applicationDidFinishLaunching:(UIApplication *)application { // create
I got this far, but it seems that buffer won't take arrays, because first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.