Well, first of all, I hope I stated my problem correctly.
I am using Xcode4, but not using the default code structure.
I am aiming at creating a transparent window here. Now, it’s very easy by just adding initialization code here :
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
[[self window] setAlphaValue:0.9];
[[self window] setOpaque: NO];
}
But, because I change the WindowAppDelegate into this :
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSLog(@"delegate: init main window");
mainWindow = [[MainWindowController alloc] initWithWindowNibName:@"MainWindow"];
[[mainWindow window] makeKeyAndOrderFront:self];
[[mainWindow window] setAlphaValue:0.8];
[[mainWindow window] setTitle:@"Fool"];
}
It won’t work. I mean the code of setAlphaValue didn’t had any effect, nor other method call such as setTitle.
I guess this is because of me didn’t wire things correctly in the NIB…
But, what is it anyway?
Thanks in advance
@bavarious. This is his answer “Have you connected the window outlet in File’s Owner (which should be of type MainWindowController) to the actual window? – Bavarious Oct 30 at 7:37”
I will accept in in two days as the answer for my question.
Thanks @bavarious!