• 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
Weird sheet behavior (I think)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird sheet behavior (I think)


  • Subject: Weird sheet behavior (I think)
  • From: Matt Bigarani <email@hidden>
  • Date: Sat, 12 Apr 2003 18:50:39 -0700

Hi,

I've got a window I'm popping up as a sheet in my prefPane. To get the sheet to slide down, the user drags an application onto an NSTableView in my prefPane. If the application can't be located in my database, it pops open a sheet with the list of applications that weren't found.

Problem is, if the Finder is in front when they drop the file on my NSTableView, and the sheet gets the command to open, it opens up as a regular window. On the other hand, if I open the applications folder up in the Finder, bring my prefpane to the front, and then drag the application(s) in, keeping the prefpane in front, the sheet slides down the way it's 'supposed' to. Bug? Normal? Something I've done?

Simple code:

[NSApp beginSheet:notFoundWindow
modalForWindow:[NSApp mainWindow]
modalDelegate:self
didEndSelector:@selector(notFoundDidEnd:returnCode:contextInfo:)
contextInfo:nil];

I'm trying to keep the behavior consistent.. It's possible I've overlooked something. I've tried doing this:

[[NSApp mainWindow] makeKeyAndOrderFront:self];
[[NSApp mainWindow] orderFrontRegardless];

before the beginSheet: code, and it doesn't have any effect.

I went through Apples notes on sheets, and I didn't find anything that said the sheet would appear as a regular window if the target window wasn't key. Am I using sheets incorrectly? If this behavior is consistent and it's not just something I've done, then it seems like cocoa expects that the window you're sliding the sheet out of is in front.

Thanks,
Matt Bigarani <email@hidden>
www.myndlinksw.com
_______________________________________________
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: Weird sheet behavior (I think)
      • From: Jan Van Tol <email@hidden>
  • Prev by Date: Re: 10.2.5 problem
  • Next by Date: Re: Problem with NSSet's containsObject: and member: methods
  • Previous by thread: first responder changing notification
  • Next by thread: Re: Weird sheet behavior (I think)
  • Index(es):
    • Date
    • Thread