• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting hold of a Documents Window for displaying a Sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting hold of a Documents Window for displaying a Sheet


  • Subject: Getting hold of a Documents Window for displaying a Sheet
  • From: Kevin Bracey <email@hidden>
  • Date: Tue, 27 Apr 2004 11:04:59 +1200

Hi all,
I've been battling this for a few days now and that means I'm doing something wrong. There is very little in the way of comments concerning this which also means I'm doing something the wrong way.

I'm trying to achieve this:
I have a document based App, each doc has additional properties, such as header information which is not displayed in the main doc window.
I would like when selecting a menu Information for a sheet to pop down and allow editing of this extra information, (just a MutDic)

I have achieved:
Setting up the menu and creating the delegate,
Getting the showInfo in the MyDocument, message to fire,
but for the life of me my document doesn't have a _window, I can see it on the screen with my own two eyes, but when debugged there is no _window, I can move it to with [[self windowForSheet] center], but when used in the NSApp sheet command it's not there? So I get this nice sheet popping out of nowhere.

this is in MyDocument

myInfo = [[[InfoController alloc] init] autorelease];
if( myInfo )
{
NSLog(@"I am in showPanel :%@", [myInfo description]);
NSLog(@"I am in self windowForSheet :%@", [self windowForSheet]);
[NSApp beginSheet:[myInfo window]
modalForWindow:[self windowForSheet]
modalDelegate:self
didEndSelector:NULL
contextInfo:nil];
[NSApp runModalForWindow:[self windowForSheet]];
// Sheet is up here.
NSLog(@"does it come back here???");
[NSApp endSheet: [self windowForSheet]];
[[myInfo window] orderOut:nil];
}

2004-04-27 10:56:16.905 Lists[2801] I am in showPanel :<InfoController: 0x39adc0>
2004-04-27 10:56:16.905 Lists[2801] I am in self windowForSheet :<NSWindow: 0x34c960>
2004-04-27 10:56:23.181 Lists[2801] does it come back here???

I also have a close message connected to a button.

This has me totally puzzelled. Any hints as to where I'm going wrong?

Kind Regards
Kevin Bracey










The best defense against logic is ignorance. _______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Getting hold of a Documents Window for displaying a Sheet
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Getting NSFontPanel color changes [SOLVED]
  • Next by Date: Re: Standard User Defaults - Setting initial values
  • Previous by thread: NSOutlineView with NSControl components
  • Next by thread: Re: Getting hold of a Documents Window for displaying a Sheet
  • Index(es):
    • Date
    • Thread