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

  • Home
  • SEARCH
  • 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 7368465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:40:51+00:00 2026-05-29T03:40:51+00:00

I am trying to create a simple modal dialog in XCode 4. I have

  • 0

I am trying to create a simple modal dialog in XCode 4. I have created the xib, created the NSWindowController derived class and made it the class in the File’s Owner of the xib. The part I am having trouble with is physically connecting the window outlet as mentioned in the answers to questions:

How to give focus to NSWindow loaded from NIB?

Why do I have to call showWindow on my NSWindowController twice on 10.5?

and in Apple documentation here:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Concepts/WinControllersAndNibs.html

I understand the concept, but I cannot figure out how to actually do it in XCode 4! I know how to connect a control in a xib to an outlet or action in a class via CTRL-drag. I just do not know what to drag to and from in this case.

Any help appreciated.

  • 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-29T03:40:52+00:00Added an answer on May 29, 2026 at 3:40 am

    OK – I figured it out.

    window outlet:
    In the IB Dock, select the File’s Owner object. Control-drag from there to the window in the XIB file. That will create the new Outlet.

    delegate outlet:
    To connect the delegate outlet to the File’s Owner, select the Window in the IB Dock. In the connection inspector, under Outlets, control-drag from “delegate” to “File’s Owner” This connection can also be made with the File’s Owner selected, just control-drag from Referencing Outlets to the window and select “delegate” from the popup.

    Edit: The best way to get this effect, delegate-to-File’s Owner outlet in Window and window-to-Window outlet in File’s Owner, is to create the NSWindowController-derived class first and let XCode create the xib in the process. Both outlets will be automatically created.

    If the xib was created first, and you wish to hook it to a NSWindowController-derived class, then the outlets can be created via ctrl-drag in IB:

    • To create the window-to-Window outlet in File’s Owner, select File’s Owner and ctrl-drag from File’s Owner to Window, then select “window” in the popup.
    • To create the delegate-to-File’s Owner outlet in Window, select Window and
      • Ctrl-drag from Window to File’s Owner, then select “delegate” in the popup.
      • or then select Connections Inspector and ctrl-drag from delegate to File’s Owner.

    These steps can also be “inverted” by using New Referencing Outlet….

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

Sidebar

Related Questions

I am trying to create a simple modal dialog on the iPad, in either
I'm trying to create a simple JQuery UI modal dialog populated with a loaded
I'm trying to create a simple modal popup. I have the CSS done, and
I am trying to create a simple dialog in MFC using Visual C++. My
I have a simple class called Applicant. I'm trying to add a template controller
I have been trying to create a fairly simple application in WPF following the
I have been working with rails3 and have been trying to create a simple
Im trying to create a simple pan and zoom app using silverlight 4, but
I am trying to create a simple page that enters data in to a
I'm trying to create a simple BaSH-like grammar on ANTLRv3 but haven't been able

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.