Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-07-01 Thread Ken Thomases
On Jul 1, 2017, at 11:11 PM, Sean McBride wrote: > >> If your window is borderless, you can make it transparent and have a >> fractional-size view (subview of the contentView) do the base opaque >> drawing, thereby effectively setting the size of the window. > > Thanks for the suggestion, though

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-07-01 Thread Sean McBride
On Fri, 30 Jun 2017 19:29:54 -0500, Ken Thomases said: >> Does anyone know what NSWindow's initWithContentRect: behaviour is >with non-integer contentRect? The docs don't say. It seems that, on a >retina display, window size can only be an even number of pixels (ie an >integer number of points).

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-07-01 Thread Sean McBride
On Fri, 30 Jun 2017 11:00:40 -0700, Quincey Morris said: >On Jun 30, 2017, at 10:26 , Sean McBride wrote: >> >> Does anyone know what NSWindow's initWithContentRect: behaviour is >with non-integer contentRect? > >Not really, but is there a reason why you can’t just try it? Obviously I tried. :)

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-06-30 Thread Ken Thomases
On Jun 30, 2017, at 12:26 PM, Sean McBride wrote: > > Does anyone know what NSWindow's initWithContentRect: behaviour is with > non-integer contentRect? The docs don't say. It seems that, on a retina > display, window size can only be an even number of pixels (ie an integer > number of point

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 10:26 , Sean McBride wrote: > > Does anyone know what NSWindow's initWithContentRect: behaviour is with > non-integer contentRect? Not really, but is there a reason why you can’t just try it? My guess would be that the window’s backing store would be pixel- or point-aligne

Re: -[NSWindow makeFirstResponder:] error when NSDrawer is involved

2017-03-25 Thread kata
> 2017/03/25 3:04、Bill Cheeseman wrotes: > > Has anybody else encountered this issue? Any suggestions? I got the same error message even the drawer is hidden. I set my custom control as the first responder in a dialog window just after loading xib. I could not rid of this message, then red

Re: -[NSWindow makeFirstResponder:] error when NSDrawer is involved

2017-03-25 Thread Bill Cheeseman
> On Mar 24, 2017, at 3:53 PM, Quincey Morris > wrote: > > On Mar 24, 2017, at 11:04 , Bill Cheeseman > wrote: >> >> Any suggestions? > > No good ones, but you keep referring to the “main” window. Is it possible > that the drawer window is initially the key w

Re: -[NSWindow makeFirstResponder:] error when NSDrawer is involved

2017-03-24 Thread Quincey Morris
On Mar 24, 2017, at 11:04 , Bill Cheeseman wrote: > > Any suggestions? No good ones, but you keep referring to the “main” window. Is it possible that the drawer window is initially the key window, and this is interfering with setting the first responder? Can you verify that whether main window

Re: nswindow orderOut

2017-01-22 Thread Ken Thomases
On Jan 22, 2017, at 4:35 PM, yu...@aim.com wrote: > > I was trying to hide a minimized window using OrderOut. From the discussions > i read so far from other websites, it seemed like OrderOut would not work on > minimized window. > > What i did was to restore the minimized window first by

Re: NSWindow not redrawing subviews

2017-01-07 Thread Tamas Nagy
Makes sense, thanks Ken! > On 2017. Jan 7., at 8:55, Ken Thomases wrote: > > On Jan 7, 2017, at 12:59 AM, Tamas Nagy wrote: >> >> This is a video mixer app. There are multiple windows for controlling >> layers, effects, etc. Rendering is done on a CVDisplayLink thread by OpenGL. >> Whenever

Re: NSWindow not redrawing subviews

2017-01-06 Thread Ken Thomases
On Jan 7, 2017, at 12:59 AM, Tamas Nagy wrote: > > This is a video mixer app. There are multiple windows for controlling layers, > effects, etc. Rendering is done on a CVDisplayLink thread by OpenGL. Whenever > I need to update something on the UI from that CVDisplayLink thread I call > dispat

Re: NSWindow not redrawing subviews

2017-01-06 Thread Tamas Nagy
Hi Ken, > > You say you're calling -setNeedsDisplay: on the main thread, but other than > that, what do you mean by "multi-thread, multi-window app"? Are you doing > _any_ GUI manipulation from background threads? If so, what? This is a video mixer app. There are multiple windows for control

Re: NSWindow not redrawing subviews

2017-01-06 Thread Ken Thomases
On Jan 6, 2017, at 10:14 AM, Tamas Nagy wrote: > > I ran into an issues with a multi-thread, multi-window app, where one or more > windows stop displaying after a while. […] > And by saying a window stop displaying I mean there are subviews that has > been marked to be fully redrawn by setNeed

Re: NSWindow displaying asynchronously starting in 10.11

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 21:53 , Jerry Krinock wrote: >> The correct approach has always been to retrieve the result URL(s) you want, >> then orderOut: the panel before doing something else in the completion >> handler > > I just tried adding an -orderOut before the 5-second sleep in my demo. Stil

Re: NSWindow displaying asynchronously starting in 10.11

2015-11-30 Thread Jerry Krinock
> On 2015 Nov 30, at 14:35, Quincey Morris > wrote: > > I’m not aware that the APIs you mention in 1 and 2 have any known contract > about when they have their effect. It could be synchronous or asynchronous, > and it could be now or later. You are correct. But after 20 years, seems like a

Re: NSWindow

2015-11-30 Thread Martin Wierschin
> On 1 Dec 2015, at 5:23 AM, Jerry Krinock wrote: > > 1. Create a NSWindow, send it a -display message, and then in that same run > loop cycle execute some task of noticeable duration. In 10.10, the window > will appear on the screen before the task starts. In 10.11, the window does > not a

Re: NSWindow

2015-11-30 Thread Shane Stanley
On 1 Dec 2015, at 5:23 AM, Jerry Krinock wrote: > > 1. Create a NSWindow, send it a -display message, and then in that same run > loop cycle execute some task of noticeable duration. In 10.10, the window > will appear on the screen before the task starts. In 10.11, the window does > not app

Re: NSWindow

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 10:23 , Jerry Krinock wrote: > > Did I miss the announcement of this rather major change? I don’t think so, I think you are Doing It Wrong™. ;) I’m not aware that the APIs you mention in 1 and 2 have any known contract about when they have their effect. It could be synchron

Re: NSWindow

2015-11-30 Thread Richard Charles
> On Nov 30, 2015, at 11:23 AM, Jerry Krinock wrote: > > Apple has made a huge change in the way windows are drawn in El Capitan, > which I cannot find mentioned in the Release Notes. Here are some examples: > > 1. Create a NSWindow, send it a -display message, and then in that same run > l

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-26 Thread Jerry Krinock
> On 2015 Nov 25, at 02:49, Graham Cox wrote: > > I looked at the docs, saw [NSWindow -endSheet:sheetWindow] and totally > misinterpreted it. I might be losing my mind, this sort of thing seems to be > happening a lot lately. Your mind is fine – you’ve just been using Cocoa for so long that y

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-25 Thread Graham Cox
> On 25 Nov 2015, at 4:58 PM, Quincey Morris > wrote: > > n the end, I’ve come to the (possibly incorrect) conclusion, and that Graham > misspoke. Yup, I’m a complete idiot. I looked at the docs, saw [NSWindow -endSheet:sheetWindow] and totally misinterpreted it. I might be losing my mind,

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 14:54 , Graham Cox wrote: > > you close the sheet itself by sending -endSheet to the SHEET, not its parent I’ve been puzzling over this statement for a while. At first I thought, “Oh, that’s right, you can. I guess you can send it to the sheet or the sheet’s parent window.”

Re: -[NSWindow endSheet?], was parentWindow

2015-11-24 Thread Jerry Krinock
> On 2015 Nov 24, at 14:54, Graham Cox wrote: > > You don’t send the parent window endSheet to run the completion handler - you > close the sheet itself by sending -endSheet to the SHEET, not its parent. Graham, I cannot find such a method, endSheet with no colon. > If you need to communicate

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Jerry Krinock
> On 2015 Nov 24, at 09:46, Quincey Morris > wrote: > > wrong property … The parent window in relation to *sheets* is “sheetParent”. Yes. Thank you. Another “bingo” for Quincey :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Graham Cox
> On 25 Nov 2015, at 3:47 AM, Jerry Krinock wrote: > > ’m updating an old project which used the -[NSApp beginSheet:] methods to > use -[NSWindow beginSheet:completionHandler:]. In so doing, I now need the > parent window in my action methods, so I can send the -[NSWindow endSheet::] > m

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 08:47 , Jerry Krinock wrote: > > In so doing, I now need the parent window in my action methods, so I can send > the -[NSWindow endSheet::] message which runs the completion handler. In > many cases, the sheet is handy but the parent window is not. No problem, I > thought

Re: NSWindow Question

2015-10-29 Thread Lee Ann Rucker
windowDidBecomeKey or BecomeMain? Probably Key, if you want the one that got clicked on. Front isn’t all that useful; a window could be key but not front if it has something like a floating tools palette. Window notifications/delegate methods always start with windowVerb, so searching that patt

Re: NSWindow child window and key status

2015-06-16 Thread Ben
Thank you for the suggestion, unfortunately it does not fix the problem. I will probably end up using a tech support incident for this one. - Ben > On 15 Jun 2015, at 23:50, Quincey Morris > wrote: > > On Jun 15, 2015, at 13:38 , Ben > wrote: >> >> I'

Re: NSWindow child window and key status

2015-06-15 Thread Quincey Morris
On Jun 15, 2015, at 13:38 , Ben wrote: > > I'm trying to replicate a portion of UI in a manner similar to the formula > editor of Numbers. For those not familiar, its a widget that floats above the > spreadsheet grid featuring a text view and a button or two. > > Currently I am using the addCh

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
> > No, then the window will be uncloseable. What needs to be different > depending on that property is whether you call -release, not whether you pass > the -close call up to super. If you're using ARC, you don't get to control > whether you call release. Therefore, you need to set released

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Ken Thomases
On Apr 2, 2015, at 11:53 AM, Dave wrote: > On 2 Apr 2015, at 17:09, Ken Thomases wrote: >> >> On Apr 2, 2015, at 10:56 AM, Dave wrote: >> >>> I’m getting a crash in dealloc in an NSWindow Subclass. >> >>> If I run this, then I get a crash when the autorelease pool is drained. >>> However, i

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
> On 2 Apr 2015, at 17:09, Ken Thomases wrote: > > On Apr 2, 2015, at 10:56 AM, Dave wrote: > >> I’m getting a crash in dealloc in an NSWindow Subclass. > >> If I run this, then I get a crash when the autorelease pool is drained. >> However, if I take out the line: >> >> [super close]; >>

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Ken Thomases
On Apr 2, 2015, at 10:56 AM, Dave wrote: > I’m getting a crash in dealloc in an NSWindow Subclass. > If I run this, then I get a crash when the autorelease pool is drained. > However, if I take out the line: > > [super close]; > > in my close method, all works fine. > > Is this expected? If

Re: NSWindow remember whether showing on re-launch

2014-02-08 Thread Michael Babin
On Feb 8, 2014, at 9:45 AM, Michael Babin wrote: > On Feb 7, 2014, at 11:43 PM, Roland King wrote: > >> I have a window in my OSX application which shows a log of commands. It's >> not 'Visible At Launch' because you often don't need to see it. It's also >> excluded from the windows menu, ins

Re: NSWindow remember whether showing on re-launch

2014-02-08 Thread Michael Babin
On Feb 7, 2014, at 11:43 PM, Roland King wrote: > I have a window in my OSX application which shows a log of commands. It's not > 'Visible At Launch' because you often don't need to see it. It's also > excluded from the windows menu, instead it has its own permanent menu item on > that menu wh

Re: NSWindow Level Side Effect - PopUp to Normal

2013-10-29 Thread Caylan Larson
> This works great… except when the window nears the main menu. If I get > close to the main menu, the child window’s frames start to get limited in > upward mobility. This causes drawing bugs. Strangely, the redrawing doesn’t > happen until I setFrame: (vs setFrameOrigin). However, draggin

Re: NSWindow Level Side Effect - PopUp to Normal

2013-10-28 Thread Caylan Larson
On Oct 28, 2013, at 9:38 PM, Caylan Larson wrote: >> Ken Thomas wrote: >> >> I believe that ordering your window behind the other window would work >> (after you've reduced its level), but you're not correctly identifying the >> target window. The window number list includes the menu bar and

Re: NSWindow Level Side Effect - PopUp to Normal

2013-10-28 Thread Ken Thomases
On Oct 28, 2013, at 7:32 PM, Caylan Larson wrote: > When my app is active its windows are set to NSPopUpMenuWindowLevel. This is > to capture main menu screen real estate inside of its frame (it’s a > “scope”-type utility: www.labelscope.com). When I receive > applicationDidResignActive, I se

Re: NSWindow setMinSize: jumps up to current size instead

2013-08-23 Thread Jerry Krinock
On 2013 Aug 23, at 13:41, Ken Thomases wrote: > On Aug 23, 2013, at 3:22 PM, Jerry Krinock wrote: > >> On 2013 Aug 23, at 12:53, Ken Thomases wrote: >> >>> I think it's just that, if you use -setContentMinSize:, you shouldn't also >>> use -setMinSize:. >> >> Yes, I'd thought of that, and ch

Re: NSWindow setMinSize: jumps up to current size instead

2013-08-23 Thread Ken Thomases
On Aug 23, 2013, at 3:22 PM, Jerry Krinock wrote: > On 2013 Aug 23, at 12:53, Ken Thomases wrote: > >> I think it's just that, if you use -setContentMinSize:, you shouldn't also >> use -setMinSize:. > > Yes, I'd thought of that, and checked for it with the Find Navigator, but the > answer is

Re: NSWindow setMinSize: jumps up to current size instead

2013-08-23 Thread Jerry Krinock
On 2013 Aug 23, at 12:53, Ken Thomases wrote: > I think it's just that, if you use -setContentMinSize:, you shouldn't also > use -setMinSize:. Yes, I'd thought of that, and checked for it with the Find Navigator, but the answer is that I was *not* using setContentMinSize: anywhere on this win

Re: NSWindow setMinSize: jumps up to current size instead

2013-08-23 Thread Ken Thomases
On Aug 23, 2013, at 10:22 AM, Jerry Krinock wrote: > On 2013 Aug 23, at 07:03, Keary Suska wrote: > >> Anyway, perhaps it is a bug in reconciling minSize with minContentSize. > > I know, but I really don't want to go there. This is NSWindow, for heaven's > sake. From NeXT. The method setMin

Re: NSWindow setMinSize: jumps up to current size instead

2013-08-23 Thread Jerry Krinock
On 2013 Aug 23, at 07:03, Keary Suska wrote: > Just to be sure, is autolayout enabled? No. > Anyway, perhaps it is a bug in reconciling minSize with minContentSize. I know, but I really don't want to go there. This is NSWindow, for heaven's sake. From NeXT. The method setMinSize: has prob

Re: NSWindow setMinSize: jumps up to current size instead

2013-08-23 Thread Keary Suska
On Aug 23, 2013, at 7:24 AM, Jerry Krinock wrote: > This should be easy. What am I doing wrong here? > > • Window height is 692, content min height is 363 and min height is 431. > • I set the min height to 646. > • Read it back, using -minSize. > > Expected result: Because I tried to *increase

Re: NSWindow - flickering shadow during height animation (borderless, transparent)

2013-05-02 Thread Robert Vojta
Okay, so, here's the solution … The problem was in this … Wrong way I was listening for contentView frame changes (NSViewDidChangeFrameNotification) and I was calling display/invalidateShadow whenever I receieved this notification. Correct way NSWindowDelegate has windowDidResize notification

Re: NSWindow - flickering shadow during height animation (borderless, transparent)

2013-04-23 Thread Robert Vojta
On Wednesday, 24. April 2013 at 1:28, Ken Thomases wrote: Hi Ken, > It's not clear if you tried to use [self invalidateShadow] instead of all > three lines or just instead of the last two. The shadow shape is computed > from the visible content of the window. That's why there's a call to -disp

Re: NSWindow - flickering shadow during height animation (borderless, transparent)

2013-04-23 Thread Ken Thomases
On Apr 23, 2013, at 5:55 AM, Robert Vojta wrote: > I do use borderless & transparent NSWindow with shadow. The way I do > initialize this window is at the end of this email. I experienced lot of > problems with shadow, but found in Apple examples that the only way to fix > shadow (= read to dis

Re: nswindow close button for my splitview does not display cross while mouse hover

2012-10-16 Thread Jens Alfke
On Oct 16, 2012, at 12:35 AM, Sanjay Arora wrote: > I am creating a new Button like the window's close button to attach it to my > splitview to give is same close action. > The problem is the button does not displays cross while I the hover mouse > over it. > NSButton *closeControl = [NSWind

Re: nswindow close button for my splitview does not display cross while mouse hover

2012-10-16 Thread Kyle Sluder
On Tue, Oct 16, 2012, at 12:35 AM, Sanjay Arora wrote: > Hi, > I am creating a new Button like the window's close button to attach it > to my splitview to give is same close action. > > The problem is the button does not displays cross while I the hover mouse > over it. > > NSButton *closeContr

Re: nswindow close button for my splitview does not display cross while mouse hover

2012-10-16 Thread Stephane Sudre
On Tue, Oct 16, 2012 at 9:35 AM, Sanjay Arora wrote: > Hi, > I am creating a new Button like the window's close button to attach it to my > splitview to give is same close action. > > The problem is the button does not displays cross while I the hover mouse > over it. > > NSButton *closeContro

Re: NSWindow with a NSTableView redraws incorrectly with autolayout on 10.8

2012-08-05 Thread Fritz Anderson
On 5 Aug 2012, at 4:09 AM, Marcus Karlsson wrote: > If I run the application the window displays with the toolbar at the top > and the table view in the middle. I then click on the green title bar > button twice in order to first maximize the window and then restore it > to its original size. How

Re: NSWindow styleMask and full screen

2012-07-19 Thread Gideon King
It turns out that on 10.6+ at least, just setting the button cell to enabled does the trick: NSButton *button = [window standardWindowButton:NSWindowMiniaturizeButton]; NSButtonCell *buttonCell = [button cell]; [buttonCell setEnabled:YES]; Still, it's definitely an Apple bug, and I'l

Re: NSWindow styleMask and full screen

2012-07-19 Thread Lee Ann Rucker
It's an Apple bug - I meant to file it but apparently didn't; I should do that. It's nothing to do with the styleMask; sometimes the window sets the buttonCell's temporarilyDisabled flag and doesn't restore it. From a comment in my code: * temporarilyDisabled should only be YES when the menubar

Re: NSWindow setShowsResizeIndicator not working

2012-07-02 Thread Kyle Sluder
On Jul 2, 2012, at 12:45 AM, Sanjay Arora wrote: > I am on Lion. Any alternatives? No, because Lion allows you to resize windows from any edge. The resize indicator wouldn't make any sense. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

RE: NSWindow setShowsResizeIndicator not working

2012-07-02 Thread Sanjay Arora
I am on Lion. Any alternatives? -Original Message- From: Lee Ann Rucker [mailto:lruc...@vmware.com] Sent: 02 July 2012 12:56 PM To: Sanjay Arora Cc: cocoa-dev@lists.apple.com Subject: Re: NSWindow setShowsResizeIndicator not working Snow Leopard was the last version to have a visible

Re: NSWindow setShowsResizeIndicator not working

2012-07-02 Thread Lee Ann Rucker
Snow Leopard was the last version to have a visible grow zone; which OS are you on? - Original Message - From: "Sanjay Arora" To: cocoa-dev@lists.apple.com Sent: Sunday, July 1, 2012 11:36:42 PM Subject: NSWindow setShowsResizeIndicator not working Hi, I have tried creating a NSWindow

Re: NSWindow AutoSave

2012-06-22 Thread Charlie Dickman
I don't know that this is a secret recipe but it works for me when I include the following 2 lines of code in the awakeFromNib method of the NSview in the window... [[self window] setFrameUsingName: @"autosaveView"]; [[self window] setFrameAutosaveName: @"autosaveView"]; And I don't know

Re: NSWindow AutoSave

2012-06-22 Thread Richard Altenburg (Brainchild)
It seems to me that indeed there are bugs in the AutoSave mechanism, but as I am not sure what you already tried I suggest reading this and then ask for more when needed: http://cocoadev.com/wiki/NSWindowFrameAutosizing Op 22 jun. 2012, om 18:10 heeft koko het volgende geschreven: > I have sea

Re: NSWindow title bar view height

2011-09-09 Thread Torsten Curdt
> I have never seen a non-hackish way to tweak the title bar in such a way, > unfortunately. There are some methods to access and adjust the standard > buttons, but the layout and drawing of the title bar are done by > undocumented internal classes. > (If you want to see real hackish, you should lo

Re: NSWindow title bar view height

2011-09-09 Thread Jens Alfke
On Sep 9, 2011, at 11:41 AM, Torsten Curdt wrote: > I am wondering what could be the best way of creating a NSWindow that > has a bigger title bar - similar to the AppStore app or iCal (to add > some other NSViews). A project I found doing just that feels a little > hack'ish I have never seen a

Re: NSWindow setFrame:display: ceiling behavior?

2011-08-27 Thread Arbit Richardi
On Sat, Aug 27, 2011 at 12:31 AM, Nick Zitzmann wrote: > > On Aug 25, 2011, at 2:36 PM, Arbit Richardi wrote: >> Is there another method that will >> draw windows at non-whole number point sizes? > > No. What are you trying to accomplish? Cocoa has no problem at all drawing *views* with non-whol

Re: NSWindow setFrame:display: ceiling behavior?

2011-08-27 Thread Nick Zitzmann
On Aug 25, 2011, at 2:36 PM, Arbit Richardi wrote: > Given the following code snip: > > NSRect newFrame = [myWindow frame]; > newFrame.size.width = 772.16; > [myWindow setFrame:newFrame display:YES]; > NSLog(@"%f", [myWindow frame].size.width); > > The output is: 773.00, and in fact, the wi

Re: NSWindow setFrame:display: ceiling behavior?

2011-08-27 Thread Kyle Sluder
On Aug 25, 2011, at 1:36 PM, Arbit Richardi wrote: > Why do windows prefer whole points? Most things will try to draw at integral pixel boundaries, because otherwise they look fuzzy and weird. > Is there another method that will > draw windows at non-whole number point sizes? Probably not, no

Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]

2011-05-19 Thread Kyle Sluder
On Thu, May 19, 2011 at 1:34 PM, Jeff Johnson wrote: > Wouldn't you want to tie a notification to the OK action rather than to the > window closing? I don't know if you have a Cancel too, but if so, you > wouldn't want that to bring the window forward. I'm using the window closing notification

Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]

2011-05-19 Thread Jeff Johnson
On May 18, 2011, at 1:35 PM, Kyle Sluder wrote: > On Wed, May 18, 2011 at 11:24 AM, Jeff Johnson > wrote: >> On May 17, 2011, at 9:37 PM, Kyle Sluder wrote: >> >>> When the panel is summoned, I want the panel to remember the >>> "document" window on whose toolbar item the user clicked, or none i

Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]

2011-05-18 Thread Kyle Sluder
On Wed, May 18, 2011 at 11:24 AM, Jeff Johnson wrote: > On May 17, 2011, at 9:37 PM, Kyle Sluder wrote: > >> When the panel is summoned, I want the panel to remember the >> "document" window on whose toolbar item the user clicked, or none if >> the panel was summoned by the menu item. This is beca

Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]

2011-05-18 Thread Jeff Johnson
On May 17, 2011, at 9:37 PM, Kyle Sluder wrote: > When the panel is summoned, I want the panel to remember the > "document" window on whose toolbar item the user clicked, or none if > the panel was summoned by the menu item. This is because I want to > bring that window forward when I dismiss the

Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]

2011-05-17 Thread Kyle Sluder
On Tue, May 17, 2011 at 5:55 PM, Jeff Johnson wrote: > I believe that the main purpose not only of -isReleasedWhenClosed but also > NSWindowWillCloseNotification is to handle memory management and/or clean up > when you're permanently done with a window. Indeed, the link above explains > how yo

Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]

2011-05-17 Thread Jeff Johnson
Hi Kyle. I don't believe there's a distinction here between "high level" and "low level" API. Iit's just a simple distinction between being done with the window and not being done with the window. When your app is permanently done with a window and will never display it again, you call -close,

Re: NSWindow Deferred Window Display Support

2010-09-27 Thread Kyle Sluder
On Sep 27, 2010, at 7:07 PM, Richard Somers wrote: > In Mac OS X 10.6 there is a new constant defined. > > #define NSAppKitVersionNumberWithDeferredWindowDisplaySupport > > The documentation says "Developers should not need to use this constant > unless they are writing applications for Mac OS

RE: NSWindow and setLevel

2010-08-05 Thread Aragao, Andre Augusto de (Andre)
avaya@lists.apple.com] On Behalf Of Aragao, Andre Augusto de (Andre) Sent: Wednesday, July 28, 2010 4:34 PM To: Seth Willits; Cocoa-Dev Mailing List Subject: RE: NSWindow and setLevel Doesn't work. Here is my code: NSApp delegate] mainControll

RE: NSWindow and setLevel

2010-07-28 Thread Aragao, Andre Augusto de (Andre)
iling List Subject: Re: NSWindow and setLevel On Jul 22, 2010, at 12:29 PM, Aragao, Andre Augusto de (Andre) wrote: > I have a requirement to have the main window for a certain application > to stay on top of all other windows. What I found out is that if I > use anythi

Re: NSWindow and setLevel

2010-07-22 Thread Seth Willits
On Jul 22, 2010, at 12:29 PM, Aragao, Andre Augusto de (Andre) wrote: > I have a requirement to have the main window for a certain application > to stay on top of all other windows. What I found out is that if I use > anything higher than kCGNormalWindowLevel for the NSWindow level, I > achieve t

Re: NSWindow and IBPlugins

2010-06-20 Thread Kyle Sluder
On Sun, Jun 20, 2010 at 9:25 AM, Martin Pilkington wrote: > The issue is, when I then try to drag the window out of the library, IB > throws an exception because (supposedly) NSWindow doesn't support archiving. > Even if I make it try to add a plain NSWindow it does the same. I'm not quite > su

Re: [NSWindow title] isn't the title

2010-04-22 Thread Reinhard Segeler
Hi, you can use "lastPathComponent" on the string you received by "title" and use that as the "title" for the other window. Am 22.04.2010 um 07:05 schrieb Quincey Morris: This is more of a curiosity than anything else, but ... I have a (non-document) window whose title is set with 'setTi

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Jens Alfke
On Mar 26, 2010, at 11:08 AM, Daniel Weber wrote: It appears that drawing the rounded rect vs. a regular rect is slow. Also, I am filling using a pattern image vs. a solid color. These things add up to a pretty slow redraw at large sizes. I wouldn't expect those to be slow enough to notice. H

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Paul Sanders
nders - Original Message - From: "Daniel Weber" To: Sent: Friday, March 26, 2010 6:08 PM Subject: Re: NSWindow subclass VERY slow to resize It appears that drawing the rounded rect vs. a regular rect is slow. Also, I am filling using a pattern image vs. a solid color. Thes

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Daniel Weber
It appears that drawing the rounded rect vs. a regular rect is slow. Also, I am filling using a pattern image vs. a solid color. These things add up to a pretty slow redraw at large sizes. I can set the max size to something relative low, but does anyone have any other suggestions? How does a Find

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Jens Alfke
On Mar 26, 2010, at 3:36 AM, Daniel Weber wrote: > Is there some way to speed this up? Could something else be going on? Sample it and find out. The way I do it is: sleep 5; sample MyApp 5 hit Return, immediately click your app’s window and start resizing. Keep going until the ‘sample

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Alexander Bokovikov
Hi, All, I'm sorry for an offtopic, so I'm writing just to close the thread. On 02.03.2010, at 7:37, Andy Lee wrote: If I feel my app should come forward in both cases I do think it should be okay to implement it that way, but there *is* precedent for not activating the app. I'd even say,

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Andreas Mayer
Am 02.03.2010 um 00:27 Uhr schrieb Matthew Lindfield Seager: If I've told a video player to start playing files on open I would generally expect the player to bring itself to the front after specifically dropping a media file onto it. Well, yes. But that's not what we are talking about. We ar

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Andy Lee
On Mar 1, 2010, at 6:27 PM, Matthew Lindfield Seager wrote: > On Monday, March 1, 2010, Andreas Mayer wrote: >> Try dragging something onto the iTunes source list. iTunes will import it, >> but will not activate itself. > > Apples & Oranges... iTunes is (was?) a library application more than a >

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Matthew Lindfield Seager
On Monday, March 1, 2010, Andreas Mayer wrote: > Try dragging something onto the iTunes source list. iTunes will import it, > but will not activate itself. Apples & Oranges... iTunes is (was?) a library application more than a player. It also has origins in audio, not video. Then again I think t

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Andreas Mayer
Am 28.02.2010 um 21:20 Uhr schrieb Alexander Bokovikov: What do you have in mind? Is it incorrect to create such behavior? I think it is. My app is a player. Dropping file into it I'd expect its activation. Why? Without activation all visual controls are not reachable unless you'll cli

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Alexander Bokovikov
On 28.02.2010, at 22:38, Andreas Mayer wrote: Hm. You don't? Just dragging should not switch the focus to another application. What do you have in mind? Is it incorrect to create such behavior? My app is a player. Dropping file into it I'd expect its activation. Am I wrong? Without activ

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Klaus Backert
On 28 Feb 2010, at 15:46, Alexander Bokovikov wrote: On 28.02.2010, at 17:48, jonat...@mugginsoft.com wrote: Try scheduling it for the next iteration of the run loop. [mainWindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.0]; It looks like I've understo

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Andreas Mayer
Am 28.02.2010 um 15:46 Uhr schrieb Alexander Bokovikov: I drop a file into my app's window. And the question is how to "switch the global system focus" to my app? Hm. You don't? Just dragging should not switch the focus to another application. Of course you *can* steal the focus using NSAp

Re: NSWindow - makeKeyAndOrderFront problem - solved

2010-02-28 Thread Alexander Bokovikov
On 28.02.2010, at 17:48, jonat...@mugginsoft.com wrote: Try scheduling it for the next iteration of the run loop. [mainWindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.0]; Really the problem was not in the scheduling but just in the scope of the message

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Alexander Bokovikov
On 28.02.2010, at 17:48, jonat...@mugginsoft.com wrote: Try scheduling it for the next iteration of the run loop. [mainWindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.0]; It looks like I've understood why it is not working. Here is the message descript

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Alexander Bokovikov
On 28.02.2010, at 17:48, jonat...@mugginsoft.com wrote: Try scheduling it for the next iteration of the run loop. [mainWindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.0]; I tried it too as well as performSelectorOnMainThread:(SEL)aSelector withObject:(i

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread jonat...@mugginsoft.com
On 28 Feb 2010, at 12:37, Alexander Bokovikov wrote: > Hi, All, > > Perhaps it's my misunderstanding, but I can't activate window title when I > apply > > [mainWindow makeKeyAndOrderFront:nil] > > to main app window in the "performDragOperation" drag&drop handler. The > content is dropped int

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-26 Thread Ariel Feinerman
It works: in -applicationWillFinishLaunching: or other init [win setContentAspectRatio: NSMakeSize(kWidth, kHeight)]; [win setContentSize: NSMakeSize(theWidth, theWidth * [win contentAspectRatio])]; then aspect ratio is keeping automatically 2010/2/25 Oftenwrong Soong > On Thu, February 25, 2

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread Oftenwrong Soong
On Thu, February 25, 2010 7:37:17 AM Alexander Bokovikov wrote: > I don't understand what is the problem. Isn't "my" 422/674 ratio not a > constant? > What is a principal difference between it and "yours" 4/3? Just substitute my > digits > to whatever you need. You'll get just the same result.

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread Alexander Bokovikov
On Thursday, February 25, 2010 at 5:57 PM Ariel Feinerman wrote: You calculate view`s aspect from it size, but I mean content frame (not window frame) from constant aspect, for example 4/3, then set size. I don't understand what is the problem. Isn't "my" 422/674 ratio not a constant? What is

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread Ariel Feinerman
Vinai, maybe, I thought they are equivalent, thank you. 2010/2/25 vinai > > --- On Thu, 2/25/10, Ariel Feinerman wrote: > > > ... > > > > There is neither techinque for setting window`s frame > > itself, nor message for setting content view aspect. > > Ariel, > > Does the method setContentAs

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread vinai
--- On Thu, 2/25/10, Ariel Feinerman wrote: > ... > > There is neither techinque for setting window`s frame > itself, nor message for setting content view aspect. Ariel, Does the method setContentAspectRatio for NSWindow not do what you need ? cheers vinai

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread Ariel Feinerman
Alexander, And it works perfectly for me. 674 x 422 - is my original content view size, > defined in IB. You calculate view`s aspect from it size, but I mean content frame (not window frame) from constant aspect, for example 4/3, then set size. > Unfortunately IB operates by window's content v

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread Alexander Bokovikov
On 25.02.2010, at 15:17, Ariel Feinerman wrote: there is of the matter is that -setAspectRatio: sets the window`s aspect ratio, but when window has been loaded from nib and not resized yet, its size is taken from "content size" that was written in IB with it own aspect. Then when window ha

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-25 Thread Ariel Feinerman
Hi, there is of the matter is that -setAspectRatio: sets the window`s aspect ratio, but when window has been loaded from nib and not resized yet, its size is taken from "content size" that was written in IB with it own aspect. Then when window has been resized it instantly get size to conform aspec

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-18 Thread Eric Gorr
On Feb 18, 2010, at 1:55 PM, Alexander Bokovikov wrote: > Hi, All, > > I'm sorry if this is a stupid question, but I don't see an evident answer... > I need the subj, but don't see appropriate NSWindow method... Am I missing > something? You could check out NSWindow's setAspectRatio or setCon

  1   2   >