Cloud and Microsoft technologies enthusiast architect in Switzerland RSS 2.0
# Wednesday, October 20, 2004

Dans une nib, vous avez une fenêtre (NSWindow) et un panel (NSPanel), par exemple. Maintenant, dans la méthode awakeFromNib vous écrivez :

- (void) awakeFromNib
{
[NSApp runModalForWindow: mainPanel];
NSLog(@"%s", __PRETTY_FUNCTION__);
}

Si votre fenêtre possède l'attribut "Visible at launch time", celle-ci ne risque pas de s'afficher tant que le panel ne sera pas fermé. Ceci car awakeFromNib est la première méthode appelée... De même si vous tentez de modifier le menu, il n'apparaîtra pas. Logique me direz-vous, mais il faut y penser !

In your nib file you have a NSWindow and a NSPanel. Now write the following code :

- (void) awakeFromNib
{
[NSApp runModalForWindow: mainPanel];
NSLog(@"%s", __PRETTY_FUNCTION__);
}

If you window has the "Visible at launch time" attribute set, that window will not display until the panel is not dismissed. This is because awakeFromNib is called first before all other methods... We will have the same behavior if you try to change the application menu at run-time. That menu will not display.

Wednesday, October 20, 2004 3:22:02 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Technical
Google Cloud Platform Certified Professional Cloud Architect
Ranked #1 as
French-speaking SharePoint
Community Influencer 2013
Navigation
Currently Reading :
I was there :
I was there :
I was exhibiting at :
I was there :
I was a speaker at :
I was a speaker at :
I was a speaker at
(January 2013 session):
I was a speaker at :
I was a speaker at :
United Nations (UN) SharePoint Event 2011
I was a speaker at :
I was there !
I was there !
I was there !
I was there !
Archive
<June 2022>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2022
Yves Peneveyre
Sign In
Statistics
Total Posts: 290
This Year: 0
This Month: 0
This Week: 0
Comments: 20
Themes
Pick a theme:
All Content © 2022, Yves Peneveyre
DasBlog theme 'Business' created by Christoph De Baene (delarou)