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 8908369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:09:34+00:00 2026-06-15T03:09:34+00:00

Using MonoMac, I have a NSDocument-based application, but I’m needing to create a new

  • 0

Using MonoMac, I have a NSDocument-based application, but I’m needing to create a new NSDocument object when a button is clicked.

For example. I have in another Window I have a NSWindowController and I can do

Controller c = new Controller ();
c.Window.MakeKeyAndOrderFront (this); 

thus causing the Window to be loaded that is tied to the controller.

With the NSDocument I guess the controller is built in?
So I’m expecting something like

MyNSDocument doc = new MyNSDocument ("Some Value ");
doc.Window.MakeKeyAndOrderFront (this);

Of course this doesn’t work.

Additional info, for example when in the Application if you hit Command + N, then a new Document Window is loaded. This is cool and I basically need the same thing to happen, but when a button is clicked.

  • 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-06-15T03:09:36+00:00Added an answer on June 15, 2026 at 3:09 am

    Using “File” / “New” or Control + N invokes newDocument: on the application’s shared document controller, which is the menu.xib‘s First Responder.

    To do the same programmatically, use NSDocumentController.SharedDocumentController to get the application’s shared document controller, then invoke NewDocument () on it (you can pass null as sender):

    var controller = (NSDocumentController)NSDocumentController.SharedDocumentController;
    controller.NewDocument (null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm converting a small c# application from windows to osx using MonoDevelop and MonoMac.
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
I am trying to create an application that will have a tray icon only,
I'm trying to shutdown a MonoMac application by using Environment.Exit(0) . However, this call
I can't seem to see the NSValueTransformer class when developing a MonoMac application using
Miguel de Icaza announced a new project today called MonoMac, to develop apps for
Using Android TelephonyManager an application can obtain the state of data activity over the
Using MVC2 I have an AJAX form which is posting to a bound model.
Using the following as an example (with $db being a previously created database connection
Using SolrNet for querying & faceting. I have a combination of int, tdate and

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.