Re: What is wrong with my view ?
Re: What is wrong with my view ?
- Subject: Re: What is wrong with my view ?
- From: Matt Neuburg <email@hidden>
- Date: Wed, 3 Jul 2002 17:00:07 -0700
On Sat, 29 Jun 2002 16:07:02 +0200, kubernan <email@hidden> said:
>
- (void)awakeFromNib
>
{
>
[[queryBuilder contentView] addSubview:theSearchView]; // <- Want to
>
add subview to the modal window (queryBuilder)
>
>
[[self window] makeKeyAndOrderFront:nil];
>
[self showSearchCriterianWindow:self]; // Open the modal window
The problem might be that awakeFromNib is too soon. Not everything is ready
yet. You are guaranteed that theSearchView has been set, but that's all. In
particular I gather from things others have said that the event loop has
not started rolling yet. And I found in my app (MemoryStick) that actually
displaying a window in awakeFromNib led to all sorts of problems. These
largely went away when I used delayed messaging to show my window:
[self->mywindow performSelector: @selector(makeKeyAndOrderFront:)
withObject: self afterDelay: 0.3]
Since you have two windows to show, you should probably make a new method
containing the calls and call *that* through delayed messaging. m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.