• 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
Re: Instantiate custom NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instantiate custom NSWindow


  • Subject: Re: Instantiate custom NSWindow
  • From: Fritz Anderson <email@hidden>
  • Date: Mon, 24 Sep 2007 13:29:28 -0500


On 24 Sep 2007, at 1:10 PM, Jere Gmail wrote:

My problem now is I have a window and had created a custom class for
this window (DataWindow).

This is surprising. NSWindow is almost never subclassed, at least for the apparently-routine sort of display that the name DataWindow implies.


Now in the application controller I have this:
#include "DataWindow.h"
so I can instantiate this class.

But if I write this
NSWindow *r=[DataWindow new];
[NSApp beginSheet:r modalForWindow:window modalDelegate:self
didEndSelector:nil contextInfo:NULL];
[NSApp runModalForWindow:r];

all that I obtain is an empty window.
What I'm doing wrong?

Impossible to tell, without knowing how you implement DataWindow; especially how you populate its contentView.


	— F

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Instantiate custom NSWindow
      • From: "Jere Gmail" <email@hidden>
References: 
 >Instantiate custom NSWindow (From: "Jere Gmail" <email@hidden>)

  • Prev by Date: Re: drag and drop images to NSWindow doesn't work
  • Next by Date: best way to deal with resizable controls that can go to zero?
  • Previous by thread: Instantiate custom NSWindow
  • Next by thread: Re: Instantiate custom NSWindow
  • Index(es):
    • Date
    • Thread