Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create window in Nib



wall (email@hidden) on Thu, Oct 21, 2004 22:42 said:

> In my nib file, I have two windows, one is
>mainWindow, another is picWindow. In the mainWindow
>displayed some thumbnail pictures. I want to show a
>picture in picWindow, after clicked thumbnail in the
>mainWindow. But now, only one picWindow displayed
>after I clicked thumbnail. I want to every I clicked
>thumbnail will display in one picWindow. How can I
>create window for every I clicked thumbnail?

In the method you use to display a picWindow, you will want to create a
separate picWindowController for every picWindow you want.

Something like:

picWindowController = [[PicWindowController alloc] init];
[picWindowController showWindow:self];

picWindowController would be an NSWindowController subclass, in its -init
method do something like this:

self = [super initWithWindowNibName:@"PicWindow"];
return self;

I suspect you are only using one picWindowController now.

--
Erroneous google translation: "Do not despair! One day, we will find of
the job!"

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >How to create window in Nib (From: wall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.