• 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 behavior when setting the size of a window used as a sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird behavior when setting the size of a window used as a sheet


  • Subject: Weird behavior when setting the size of a window used as a sheet
  • From: Alexandre Aybes <email@hidden>
  • Date: Sun, 28 Dec 2003 13:08:42 -0800

Hello!

I am writing a little application that makes use of a sheet very much like iTunes' smart playlist edit dialog.
When the user selects an item in the main window and clicks edit, a sheet comes down with a list of rules. The window needs to be resized in order to fit all the rules, and here is my problem, the very first time the sheet is display the size of the window (sheet) is always off by a number of pixels (by the height of the title bar). The second time I display the sheet the size is correct. I do not understand what is going on!

The original window I display is prepared in IB and linked to my controller, then it is modified before being display (I resize and add cells to the 4 NSMatrix objects I have in the window). To resize the window I compute the new height according to the number of rules to display, and then I use NSWindow's (setFrame: display: animate:) method.

Any idea is welcome, I am clueless, when I print the frame of the window (the NSRect returned by NSWindow's frame method) when it's displayed, it always indicates the same size and origin, the first time and the second time but it does not display the same:

first time: http://www.pommsoft.com/homes/alex/sb-bad-sheet.jpg
after the first time: http://www.pommsoft.com/homes/alex/sb-good-sheet.jpg

Thanks a lot!
Alex.
_______________________________________________
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 behavior when setting the size of a window used as a sheet
      • From: "Louis C. Sacha" <email@hidden>
  • Prev by Date: AppleScript command to Cocoa-Java App
  • Next by Date: genstrings not working
  • Previous by thread: AppleScript command to Cocoa-Java App
  • Next by thread: Re: Weird behavior when setting the size of a window used as a sheet
  • Index(es):
    • Date
    • Thread