Re: Instantiate custom NSWindow
Re: Instantiate custom NSWindow
- Subject: Re: Instantiate custom NSWindow
- From: "Jere Gmail" <email@hidden>
- Date: Mon, 24 Sep 2007 20:41:40 +0200
the window is populated in Interface builder. And I have an outlet to
that window, but I wanna be able to display the window twice.
On 9/24/07, Fritz Anderson <email@hidden> wrote:
>
> 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
>
>
--
http://zon7blog.blogspot.com/
And again we fall.
_______________________________________________
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