Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 3:52 PM, Sean McBride wrote: I suspect that back in the NeXTStep days it actually did centre it. But when NeXTStep merged with Mac OS, the behaviour was changed to match the Mac OS behaviour. In Classic Mac OS this position is called the 'alert position'. See for example

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 4:05 PM, Philip Bridson wrote: I am sorry if I have offended you. Sean was more gracious than I was. Let's forget about the whole thing. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: NSWindow Centering Problem

2008-05-07 Thread Philip Bridson
Sean/Andy, I am sorry if I have offended you. I do not wish to cause an argument so please accept my apologies. The reason I put that is because it is not the first time I have had responses like that (and much worse to be fair). I am grateful for any help that I am offered but I just thi

Re: NSWindow Centering Problem

2008-05-07 Thread Jean-Daniel Dupas
AFAK, there is no other method than center to center the window on screen, but doing one that really center the window is not very difficult. @implementation NSWindow (TrueCenter) - (void)trueCenter { NSRect frame = [self frame]; NSRect *screen = [[self screen] frame];

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
Be careful how you treat people who are trying to help you. The question you asked was answered. It's your own fault if you worded it wrong. You should be happy you got lighthearted sarcasm instead of a scolding for not reading the docs. Now that you have pointed out that you *have* read

Re: NSWindow Centering Problem

2008-05-07 Thread Sean McBride
On 5/7/08 8:42 PM, Philip Bridson said: >Ok very funny. Just to clarify that I had already read the >documentation, otherwise I would not even be able to get the window >to display on the screen - but thanks for pointing it out. However, >I probably worded the question wrong, so I will re-phrase

Re: NSWindow Centering Problem

2008-05-07 Thread Gregory Weston
Philip Bridson wrote: Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? The documentation for NSWindow>>center explicitly notes that the wi

Re: NSWindow Centering Problem

2008-05-07 Thread Philip Bridson
Ok very funny. Just to clarify that I had already read the documentation, otherwise I would not even be able to get the window to display on the screen - but thanks for pointing it out. However, I probably worded the question wrong, so I will re-phrase it: If by using [MyWindow center] the

Re: NSWindow Centering Problem

2008-05-07 Thread Sean McBride
On 5/7/08 3:06 PM, Andy Lee said: >On May 7, 2008, at 2:59 PM, Philip Bridson wrote: >> Can anyone tell me why when I use [MyWindow center] the window ends >> up about an inch from the top of the screen? I thought this method >> is meant to center the window. Is there something I am doing wrong? >

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 3:06 PM, Andy Lee wrote: center Sets the receiver’s location to the center of the screen. - (void)center Discussion The receiver is placed exactly in the center horizontally and somewhat above center vertically. [...] In fairness, I think it's easy to stop reading after

Re: NSWindow Centering Problem

2008-05-07 Thread Jean-Daniel Dupas
Le 7 mai 08 à 20:59, Philip Bridson a écrit : Hi there, Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Many thanks, Phil. Reading

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 2:59 PM, Philip Bridson wrote: Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Only not reading the documentation. :)

NSWindow Centering Problem

2008-05-07 Thread Philip Bridson
Hi there, Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Many thanks, Phil. ___ Cocoa-dev