Skip navigation.
 
mlRe: [newbie]How to pop a window?
FROM : I. Savant
DATE : Sat Jul 08 17:33:52 2006

Have you seen this?

http://developer.apple.com/documentation/Cocoa/Conceptual/
ObjCTutorial/index.html

  I think a lot of your questions may be cleared up by following 
this tutorial very carefully, making sure you understand each step. 
This should give you an idea of what you may be misunderstanding. 
Give it a try - if you're still confused by any of the steps, just 
ask the list for clarification.

  I hope this helps.

--
I.S.


On Jul 8, 2006, at 10:44 AM, Bus Mini wrote:

> I did connect *IBOutlet NSWindow *myWindow *to the window which was 
> created
> in nib.
>
> and the followed code is the exactly method was called when a 
> button was
> cilcked
>
> - (IBAction)startToWork:(id)sender
> {
>  [myWindow makeKeyAndOrderFront:self];
> }
> It doesn't work.
> And I know another way to pop up a window, but It is not so good, I 
> just
> pose this to list to ask an easy way.
>
>
> - (IBAction)startToWork:(id)sender
> {
> NSRect screenRect = [[NSScreen mainScreen] visibleFrame];
>
>
>    newWindow = [[NSWindow alloc] initWithContentRect:screenRect
>            styleMask:
> NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|
> NSResizableWindowMask
>
>            backing:NSBackingStoreBuffered
>            defer:NO screen:[NSScreen mainScreen]];//notice that 
> newWindow
> is not an outlet
>
>      [myWindow setFrame: screenRect display:YES];
>    [newWindow setContentView:[myWindow contentView]];//add 
> myWindow to
> newWindow
>
>
>      [newWindow makeKeyAndOrderFront:nil];
> }
> Thanks for you advice, could you give me an example?
>
>
>
>
>
> --
> Yours sincerely
> Mini Bus.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
> 40gmail.com
>
> This email sent to <email_removed>

Related mailsAuthorDate
ml[newbie]How to pop a window? Bus Mini Jul 7, 19:25
mlRe: [newbie]How to pop a window? Uli Kusterer Jul 7, 20:33
mlRe: [newbie]How to pop a window? Bus Mini Jul 8, 06:26
mlRe: [newbie]How to pop a window? Uli Kusterer Jul 8, 12:41
mlRe: [newbie]How to pop a window? Bus Mini Jul 8, 16:44
mlRe: [newbie]How to pop a window? I. Savant Jul 8, 17:33
mlRe: How to pop a window? Bus Mini Jul 8, 17:53
mlRe: [newbie]How to pop a window? Shawn Erickson Jul 8, 18:27
mlRe: [newbie]How to pop a window? Uli Kusterer Jul 8, 21:25
mlRe: How to pop a window? Bus Mini Jul 9, 16:33