Forum Navigation
You need to log in to create posts and topics.

fbcocoa Digest 7 Oct 2011 10:11:55 -0000 Issue 57

Posted by: carnationsoftware <carnationsoftware@...>

This is how I show and hide windows in my iPhone apps if this helps you...
Where splashWindow is the name of your window in the nib...

[splashWindow setHidden:NO];

or

[splashWindow setHidden:YES];

Rich

--------------------------------------------------

On Oct 7, 2011, at 5:11 AM, [email protected] wrote:

>
> fbcocoa Digest 7 Oct 2011 10:11:55 -0000 Issue 57
>
> Topics (messages 370 through 374)
>
> Re: Nib Window
> 370 by: Bernie
> 371 by: Robert Covington
> 373 by: SVanVoorst
>
> Tutorial_7
> 372 by: SVanVoorst
>
> [Moderator] Server upgrade/downtime Sunday October 9th
> 374 by: Bernie
>
> Administrivia:
>
> To subscribe to the digest, e-mail:
> <[email protected]>
>
> To unsubscribe from the digest, e-mail:
> <[email protected]>
>
> To post to the list, e-mail:
> <[email protected]>
>
>
> ----------------------------------------------------------------------
>
>
> From: Bernie <[email protected]>
> Subject: Re: [fbcocoa] Nib Window
> Date: September 17, 2011 5:05:12 AM CDT
> To: "[email protected]" <[email protected]>
>
>
> Away from my Mac this weekend, but OTTOMH, i don't think showSplash wants to be a class, rather a method in say your AppController class. Also, there's a method in NSWindowController class (I think). Something like windowFromNib:
>
> Bernie
> [top-posted from my iPhone]
>
>
> On 17 Sep 2011, at 10:23, Robert Covington <[email protected]> wrote:
>
>> If one unchecks "show window at app startup", how does one show a NIB window in response to a menu item? Am trying to implement my own splash window. I have a window with an image view built in IB, but not sure how to 're-show' it, once I turn it off.
>>
>> ? I know i need to connect it to the menu item, create an outlet/target I guess, but not sure what NSwhatever to make it show?
>>
>> @interface showSplash : NSPanel
>> {
>>
>>
>> }
>> @end
>>
>>
>> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
>
>
> From: Robert Covington <[email protected]>
> Subject: Re: [fbcocoa] Nib Window
> Date: September 17, 2011 5:15:10 AM CDT
> To: [email protected]
>
>
> Thanks, I'll look into that.
>
> On Sep 17, 2011, at 6:05 AM, Bernie wrote:
>
>> Away from my Mac this weekend, but OTTOMH, i don't think showSplash wants to be a class, rather a method in say your AppController class. Also, there's a method in NSWindowController class (I think). Something like windowFromNib:
>>
>> Bernie
>> [top-posted from my iPhone]
>>
>>
>> On 17 Sep 2011, at 10:23, Robert Covington <[email protected]> wrote:
>>
>>> If one unchecks "show window at app startup", how does one show a NIB window in response to a menu item? Am trying to implement my own splash window. I have a window with an image view built in IB, but not sure how to 're-show' it, once I turn it off.
>>>
>>> ? I know i need to connect it to the menu item, create an outlet/target I guess, but not sure what NSwhatever to make it show?
>>>
>>> @interface showSplash : NSPanel
>>> {
>>>
>>>
>>> }
>>> @end
>>>
>>>
>>> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>>
>> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
>
> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
>
>
> From: SVanVoorst <[email protected]>
> Subject: Re: [fbcocoa] Nib Window
> Date: September 17, 2011 9:50:44 AM CDT
> To: [email protected]
>
>
> Try [xxxx showWindow: ] from the method that bw suggested.
>
> Steve Van Voorst
>
>
>
> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
>
>
> From: SVanVoorst <[email protected]>
> Subject: Tutorial_7
> Date: September 17, 2011 9:41:57 AM CDT
> To: [email protected]
>
>
> /*
> Demonstrates construction of an About Panel.
> S. Van Voorst {20110917}
> References:
> 1) NSApplication Class Reference
> 2) Technical Note TN2179
> */
> compile as "Objective-C"
>
> if system(_sysVers) < 1060 then stop "Requires OS 10.6 or newer"
>
> include resources "myImage.png"
>
> BeginCDeclaration
> @interface AppController : NSObject
> {
> }
> - (void) aboutHandler:(id)sender;
> @end //interface
> EndC
>
> BeginCFunction
> @implementation AppController
>
> - (void) aboutHandler:(id)sender
> {
> NSDictionary *options;
> NSImage *image;
>
> image = [NSImage imageNamed: @"myImage.png"];
> options = [NSDictionary dictionaryWithObjectsAndKeys:
> @"1", @"Version",
> @"Super App", @"ApplicationName",
> image, @"ApplicationIcon",
> @"Copyright 2011, MyGreatCompany", @"Copyright",
> @"Super App v1.1", @"ApplicationVersion",
> nil];
> [[NSApplication sharedApplication] orderFrontStandardAboutPanelWithOptions:options];
> }
> @end //implementation
> EndC
>
> BeginCCode
> {
> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
> [NSApplication sharedApplication];
> [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
>
> // --- Create an instance of the controller class --- //
> id myController = [[AppController alloc]init];
>
> // ******** Menu and menubar ********//
> id menubar = [[NSMenu new] autorelease];
> id appMenuItem = [[NSMenuItem new] autorelease];
> [menubar addItem:appMenuItem];
> [NSApp setMainMenu:menubar];
> id appMenu = [[NSMenu new] autorelease];
>
> // ***** About MenuItem ******//
> id appName = [[NSProcessInfo processInfo] processName];
> id aboutTitle = [@"About " stringByAppendingString:appName];
> id aboutMenuItem = [[[NSMenuItem alloc]initWithTitle:aboutTitle
> action:@selector(aboutHandler:) keyEquivalent:@""] autorelease];
> [appMenu addItem:aboutMenuItem];
> [aboutMenuItem setTarget:myController];
>
> [appMenu addItem:[NSMenuItem separatorItem]];
>
> // ***** Quit MenuItem ****** //
> // id appMenu = [[NSMenu new] autorelease];
> id quitMenuItem = [[[NSMenuItem alloc] initWithTitle:@"Quit"
> action:@selector(terminate:) keyEquivalent:@"q"] autorelease];
> [appMenu addItem:quitMenuItem];
> [appMenuItem setSubmenu:appMenu];
>
> // ******** Window ******** //
> #define _wndW 300
> #define _wndH 250
> id window = [[NSWindow alloc] initWithContentRect:NSMakeRect( 0, 0, _wndW, _wndH )
> styleMask:NSTitledWindowMask | NSClosableWindowMask
> backing:NSBackingStoreBuffered
> defer:NO];
> [window center];
> [window setTitle:@"About Panel_demo"];
> [window makeKeyAndOrderFront:nil];
>
> // ***** Quit btn ***** //
> NSButton *quitBtn = [[NSButton alloc]initWithFrame:NSMakeRect( _wndW - 130, 30, 95, 30 )];
> [quitBtn setBezelStyle:NSRoundedBezelStyle ];
> [quitBtn setTitle: @"Quit" ];
> [quitBtn setAction:@selector(terminate:)];
> [[window contentView] addSubview: quitBtn];
> [quitBtn release];
>
> [NSApp activateIgnoringOtherApps:YES];
> [NSApp run];
> [myController release];
> [pool drain];
> }
> EndC
>
>
>
> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
>
>
> From: Bernie <[email protected]>
> Subject: [Moderator] Server upgrade/downtime Sunday October 9th
> Date: October 7, 2011 5:11:34 AM CDT
> To: [email protected]
>
>
>
> Girls and boys,
>
> Associate.com and Freegroups.net will be down on Sunday October 9th from 8am to possibly 5pm EST for a server upgrade.
>
> While the server is down, please do not send email to it, as that email will likely be lost.
>
> bw
>
>
>
> To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
>
>