Re: Window not displaying
Re: Window not displaying
- Subject: Re: Window not displaying
- From: rethish <email@hidden>
- Date: Wed, 01 Jul 2009 10:58:12 +0530
- Thread-topic: Window not displaying
@implementation SendWindowClass
-(void)openNew
{
[ScheduleWindow makeKeyAndOrderFront:self];
}
-(IBAction)newWindow:(id)sender
{
[ScheduleWindow makeKeyAndOrderFront:self];
}
@end
@implementation controller
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
SendWindowClass *obj =[[SendWindowClass alloc] init];
[obj openNew];
}
On 6/30/09 8:44 PM, "Nick Zitzmann" <email@hidden> wrote:
>
> On Jun 30, 2009, at 6:13 AM, rethish wrote:
>
>> When I use the makeKeyAndOrderFront: method in a action method of a
>> NSButton , new window is displayed.
>> But I used the same method in a void function and when its called ,the
>> window is not displayed.
>> Why is it so?
>
>
> Are you sure the window object has been instantiated at that time, and
> are you sure that you are not calling the method in a thread other
> than the main thread? Can you please show your code?
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
_______________________________________________
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