• 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
creating new instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

creating new instances


  • Subject: creating new instances
  • From: James Mooney <email@hidden>
  • Date: Sat, 22 Mar 2003 09:23:11 -0500

Another Newbie Question

I have this app from a book which creates a window containing a button and NSTableView with content. I can open a file and save content in the NSTableView....good times.....

When I close the window, the window does close. So I decided to select new.....which is not enabled. So I figured why not write a method to create a new window with new content.......and this is where things get completely unwired so to speak.

I have in the interface builder a window and a instantiated NSObject class called MyController.

Question.

How do I initiated and call for the window object to create a new instance of itself. What I am wanting to do is basically have the application restart itself where a new window appears. I would rather than just be able to know "who" to call on to create a new window containing.......the NSViewTable and button.

My approach was to add a method in the application main class to invoke a method to create the new window. But then there are the issue of the event listeners for the window and binding them to methods which becomes a problem. When the app first starts, all the event listeners get connected via "magic" with the NSApplicationMain call.

Can someone point me to some literature that explains the NSApplciationMain call.

Any help would be great

Jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: object instance names generated on the fly?
  • Next by Date: Re: object instance names generated on the fly?
  • Previous by thread: Re: Window resize by blob, not by resize corner
  • Next by thread: Mounting remote volumes wit URL
  • Index(es):
    • Date
    • Thread