Re: Opening NSDrawer on app startup
Re: Opening NSDrawer on app startup
- Subject: Re: Opening NSDrawer on app startup
- From: Dan Wood <email@hidden>
- Date: Fri, 16 Nov 2001 09:16:24 -0800
Or, more simply:
[self performSelector:@selector(performOpen:) withObject:nil
afterDelay:0.0];
performSelector:withObject:afterDelay: is handy in a *lot* of
circumstances.....
On Thursday, November 15, 2001, at 02:28 PM, Charles Jolley wrote:
The following would work without making the window key and order front:
DURING INIT CODE
{
[NSTimer scheduledTimerWithTimeInterval:0
target:self
selector:@selector(performOpen:)
userInfo:nil
repeats:NO];
}
- (void)performOpen: (id)sender
{
[myDrawer open] ;
}
My programs have all been NSDocument-based, so I have done this in
the -windowDidLoad method of the WindowController or
-windowControllerDidLoadNib: in NSDocument, but it should also
work in an -awakeFromNib method.
On Thursday, November 15, 2001, at 08:29 AM, Ronaldo Nascimento wrote:
- (id)awakeFromNib
{
[[myDrawer parentWindow] makeKeyAndOrderFront:self];
[myDrawer open];
return self;
}
On Thursday, August 16, 2001, at 12:52 AM, Lists wrote:
I have a drawer that I'm opening when my app starts up, based on
their state last time the app was quit. My problem is the only
place I've been able to get this to work is in
windowDidBecomeMain, so if my app was launched in the background,
the drawer doesn't actually open until the window is brought to
the front. Other apps do this in the background, but from where?
-john
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Ronaldo Nascimento
NetProof(r) Solutions
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
--
Dan Wood
email@hidden
http://www.karelia.com/
http://www.bikealameda.org/
Mac OS X Developer: Online Resume:
http://www.karelia.com/resume.html