Re: Intermittent invisible NSWindow

2021-11-19 Thread davelist--- via Cocoa-dev
fying technology for your home or business" >> >> >> >>> On Nov 15, 2021, at 7:13 AM, Tom Doan via Cocoa-dev >>> wrote: >>> >>> Thanks, but is that true? I've tried forcing the window off screen >>> with setFrame: and it st

Re: Intermittent invisible NSWindow

2021-11-18 Thread Tom Doan via Cocoa-dev
> > > > Thanks, but is that true? I've tried forcing the window off screen > > with setFrame: and it still shows up (generally pinned to the top of > > the visible frame) even though the [NSWindow frame] returns the > > "off-screen" location that I programme

Re: Intermittent invisible NSWindow

2021-11-15 Thread Keary Suska via Cocoa-dev
Doan via Cocoa-dev > wrote: > > Thanks, but is that true? I've tried forcing the window off screen with > setFrame: and it still shows up (generally pinned to the top of the > visible frame) even though the [NSWindow frame] returns the > "off-screen" location

Re: Intermittent invisible NSWindow

2021-11-15 Thread Tom Doan via Cocoa-dev
Thanks, but is that true? I've tried forcing the window off screen with setFrame: and it still shows up (generally pinned to the top of the visible frame) even though the [NSWindow frame] returns the "off-screen" location that I programmed in. The only way I have found to

Re: Intermittent invisible NSWindow

2021-11-13 Thread Keary Suska via Cocoa-dev
> I'm having a problem with an application where a small percentage > of users have one particular NSWindow type which doesn't show > even though it goes through a makeKeyAndOrderFront. It's on the > window list and will open if they do a tile, cascade or window

Intermittent invisible NSWindow

2021-11-13 Thread Tom Doan via Cocoa-dev
I'm having a problem with an application where a small percentage of users have one particular NSWindow type which doesn't show even though it goes through a makeKeyAndOrderFront. It's on the window list and will open if they do a tile, cascade or window switch operation, but

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

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

2017-06-30 Thread Sean McBride
Hi, 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). (I ask because I have some cross-platform OpenGL-bas

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

-[NSWindow makeFirstResponder:] error when NSDrawer is involved

2017-03-24 Thread Bill Cheeseman
The principal view in my application's main window is a browser view. I want to make the browser view the main window's first responder. My application also has a drawer associated with the main window. The first time -[NSWindow makeFirstResponder:] is called on the main window t

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

nswindow orderOut

2017-01-22 Thread yuleo
Hi, 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 OrderFront and then hide the window by OrderOut. But the

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
es or methods in your window subclass that > might inadvertently shadow properties or methods of NSWindow? No. > > Are you doing anything unusual with the main application object or its event > loop or run loop? Are you permanently running an inner loop inside of an > event/ru

Re: NSWindow not redrawing subviews

2017-01-06 Thread Ken Thomases
dden setNeedsDisplay: to check out what is going on, and of course > the views are on a valid NSWindow object, autoDisplay is enabled, and also > the window returns YES to viewsNeedsDisplay. > > When the issue is happening the NSWindow object won’t call -display or > -displayIfNe

NSWindow not redrawing subviews

2017-01-06 Thread Tamas Nagy
to be redrawn once, but then they are stuck again. I’ve overridden setNeedsDisplay: to check out what is going on, and of course the views are on a valid NSWindow object, autoDisplay is enabled, and also the window returns YES to viewsNeedsDisplay. When the issue is happening the NSWindow

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-08 Thread Peter Teeson
> On Nov 7, 2016, at 10:58 PM, Quincey Morris > wrote: > > On Nov 7, 2016, at 19:55 , Rick Mann wrote: >> >> Xcode never gives you controls for setting a class name > > Much like the Spanish Inquisition. > > (Monty Python joke, for those going “Huh?”) Nobody expects the Spanish Inquisition

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 19:55 , Rick Mann wrote: > > Xcode never gives you controls for setting a class name Much like the Spanish Inquisition. (Monty Python joke, for those going “Huh?”) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Rick Mann
> On Nov 7, 2016, at 19:51 , Quincey Morris > wrote: > > On Nov 7, 2016, at 19:44 , Rick Mann wrote: >> >> I can drag out an NSWindow, and I can even change its class to NSPanel, but >> I can't set the style. > > You mean you dragged out a window

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 19:44 , Rick Mann wrote: > > I can drag out an NSWindow, and I can even change its class to NSPanel, but I > can't set the style. You mean you dragged out a window controller, right? When I do this, I can change the window’s class to NSPanel, and then t

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Rick Mann
. And yeah, I already made it a separate storyboard, not the main one. But there's no NSPanel object in the catalog, only NSWindow, and there's no UI for adjusting the title bar appearance (that I can see). I can drag out an NSWindow, and I can even c

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 18:28 , Rick Mann wrote: > > Is there no way to make a floating inspector window in a Storyboard in Xcode > 8? What’s preventing you from dragging out a window controller onto the storyboard? However, I would be inclined to put it in its own storyboard, since there’s not

Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Rick Mann
Is there no way to make a floating inspector window in a Storyboard in Xcode 8? -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact t

Re: Drawing issue with translucent borderless NSWindow, initial content half stays

2016-09-07 Thread Sean McBride
On Tue, 30 Aug 2016 21:03:20 -0500, Ken Thomases said: >On Aug 30, 2016, at 10:10 AM, Sean McBride wrote: >> >> I have a drawing bug in my app, and reduced it to a toy app. >Basically, I create an NSBorderlessWindowMask type window who's content >view draws a translucent rounded rect. Its only

Re: Drawing issue with translucent borderless NSWindow, initial content half stays

2016-08-31 Thread Sandor Szatmari
Sean, > On Aug 30, 2016, at 11:10, Sean McBride wrote: > > Hi all, > > I have a drawing bug in my app, and reduced it to a toy app. Basically, I > create an NSBorderlessWindowMask type window who's content view draws a > translucent rounded rect. Its only subview is an NSTextField that draw

Re: Drawing issue with translucent borderless NSWindow, initial content half stays

2016-08-30 Thread Ken Thomases
On Aug 30, 2016, at 10:10 AM, Sean McBride wrote: > > I have a drawing bug in my app, and reduced it to a toy app. Basically, I > create an NSBorderlessWindowMask type window who's content view draws a > translucent rounded rect. Its only subview is an NSTextField that draws a > number in a

Drawing issue with translucent borderless NSWindow, initial content half stays

2016-08-30 Thread Sean McBride
Hi all, I have a drawing bug in my app, and reduced it to a toy app. Basically, I create an NSBorderlessWindowMask type window who's content view draws a translucent rounded rect. Its only subview is an NSTextField that draws a number in a big font. When I display the window, all is well. B

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 win

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

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 the

NSWindow

2015-11-30 Thread Jerry Krinock
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 loop cycle execute some task of noticeable duration. In 10.10, the

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 f

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

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 -[NS

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. N

-[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Jerry Krinock
I’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::] message which runs the completion handler. In many cases, the

Re: Presenting NSWindowController/NSWindow Pair as a Sheet?

2015-10-29 Thread Seth Willits
> I have an NSWindowController/NSWindow Pair and I was wondering if I can > easily present this as a Sheet? > > At the moment it works Ok as a regular window but have need of it as a sheet > too in some cases and wondered about the best way of doing it?

Presenting NSWindowController/NSWindow Pair as a Sheet?

2015-10-29 Thread Dave
Hi, I have an NSWindowController/NSWindow Pair and I was wondering if I can easily present this as a Sheet? At the moment it works Ok as a regular window but have need of it as a sheet too in some cases and wondered about the best way of doing it? Thanks a lot All the Best Dave

Re: NSWindow Question

2015-10-29 Thread Lee Ann Rucker
I have a NSWindowController/NSWindow Pair, I’ve looked through the Class > references, but can’t see anything? > > Thanks a lot > Dave > > > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Plea

NSWindow Question

2015-10-29 Thread Dave
Hi, Is there a method something like didBecomeFrontWindow that get called when a Window becomes the front window because the User Clicked in it and it wasn’t before? I have a NSWindowController/NSWindow Pair, I’ve looked through the Class references, but can’t see anything? Thanks a lot Dave

Re: NSWindow child window and key status

2015-06-16 Thread Ben
o.co.uk>> 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. >> >> Currentl

Re: NSWindow child window and key status

2015-06-15 Thread Quincey Morris
urrently I am using the addChildWindow:ordered: method on NSWindow to add a > custom borderless window above the grid view and putting an NSTextView in > that window. So far so good. Have you tried implementing this with a NSPanel? It’s designed (when configured with suitable options) to floa

NSWindow child window and key status

2015-06-15 Thread Ben
Hi list, 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 addChildWindow:ordered: method on NSWind

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
herefore, you need to set releasedWhenClosed to > NO. > > If you're experiencing leaks when releasedWhenClosed is false, then that's a > separate bug in your code, which you need to fix. No, I’m not using ARC. releasedWhenClosed is YES. I alloc/init the NSWindow subclass and s

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

Another NSWindow Question

2015-04-02 Thread Dave
Hi, Is there a method similar in use to UIView’s layoutSubviews method? e.g a layoutWindow method. When the window is resized, I want to replace the Content View with a new one, is there a better way of doing this. This is a special case Overlay window that doesn’t have a Window Controller. A

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

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.

NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
Hi, I’m getting a crash in dealloc in an NSWindow Subclass. I have a class that creates and closes Windows based on Notifications received from elsewhere. One of the Notifications is “CloseWindow”. I added this to my subclass: -(void) close { LogIfDave(@"Overlay close"); [s

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Graham Cox
> On 17 Feb 2015, at 1:17 am, Dave wrote: > > My initial thought were to have a WindowController: > > LTWMainWindowController that looks after a number of Windows. Initial there > is just one window LTWWindowX (but I want to add others in the future, > LTWWindowY, LTWWindowZ, etc.), each wind

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Roland King
> On 17 Feb 2015, at 5:59 am, Quincey Morris > wrote: > >> On Feb 16, 2015, at 12:30 , Ken Thomases wrote: >> >> A view controller and its view should be reusable in different contexts, or >> at least designed as though it might be. > > To round out the larger discussion for posterity, I

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Quincey Morris
On Feb 16, 2015, at 12:30 , Ken Thomases wrote: > > A view controller and its view should be reusable in different contexts, or > at least designed as though it might be. To round out the larger discussion for posterity, I’d add that when using an OS X storyboard, the picture is a little bit d

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Raglan T. Tiger
> On Feb 16, 2015, at 2:38 PM, Jens Alfke wrote: > > I’m surprised by how complicated the discussion is making this seem! Me too ! -rags ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Jens Alfke
> On Feb 16, 2015, at 9:55 AM, Dave wrote: > > I can see I could do it if I had LTWViewController.xib that included an > NSWindow? I’m surprised by how complicated the discussion is making this seem! All you need to do is create an NSWindowController subclass in Xcode, chec

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Bill Cheeseman
Excellent suggestions, as usual. Thanks, Ken! > On Feb 16, 2015, at 3:30 PM, Ken Thomases wrote: > > He clearly says that the MainMenu NIB should _not_ include a window: I thought I remembered that, but when I went back for a quick check I missed the passage you quoted. That must be where I g

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Ken Thomases
On Feb 16, 2015, at 12:39 PM, Bill Cheeseman wrote: > Although I follow Mike Ash's advice, I have separate MainMenu.xib and > MainWindow.xib files instead of a single window.xib file. My MainMenu.xib > contains the application's menu bar but no window. The construction of this sentence suggest

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Dave
> On 16 Feb 2015, at 18:39, Bill Cheeseman wrote: > > Although I follow Mike Ash's advice, I have separate MainMenu.xib and > MainWindow.xib files instead of a single window.xib file. My MainMenu.xib > contains the application's menu bar but no window. MainMenu.xib is owned by > NSApplicatio

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Dave
uming they exist). Any controls whose actions were > connected to the File's Owner placeholder as the target will actually have > their target set to the window controller. Etc. > > Likewise for a view controller, but the NIB should only contain a view in &g

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Ken Thomases
contain a view in that case, not a window. > I can see I could do it if I had LTWViewController.xib that included an > NSWindow? Huh? Why does the name of the NIB file make a difference? > Thanks a lot. You're welcome. Regards, Ken ___

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Steve Mills
On Feb 16, 2015, at 13:20:24, Dave wrote: > > Thanks, I solved it, the File’s Owner didn’t take for some reason, I did it > again and it seems to work ok now. > > However, I’m guessing that something isn’t right, since I now get two > warnings - > > /path/LTWMainWindow.xib: The initial posi

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Dave
Thanks, I solved it, the File’s Owner didn’t take for some reason, I did it again and it seems to work ok now. However, I’m guessing that something isn’t right, since I now get two warnings - /path/LTWMainWindow.xib: The initial position of this window is outside of this machine's screen. a

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Bill Cheeseman
> On Feb 16, 2015, at 10:24 AM, Dave wrote: > > Thanks for this, it seems to be saying there is no need for a separate Window > Subclass and that the Window Controller Subclass contains all the code needed > to drive the window. I’m a bit confused of when to use an NSWindow and

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Bill Cheeseman
> On Feb 16, 2015, at 12:55 PM, Dave wrote: > > LTWViewController.h and LTWViewController.m, and LTWWindow.xib, then set the > file owner in the NIB to “LTWViewController”, how do I then wire up outlets, > bindings and actions so that I get properties set in LTWViewController? Connect the UI

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Dave
w.xib, then set the file owner in the NIB to “LTWViewController”, how do I then wire up outlets, bindings and actions so that I get properties set in LTWViewController? I can see I could do it if I had LTWViewController.xib that included an NSWindow? Thanks a lot. Cheers Dave > On 16 Feb 201

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Jens Alfke
unctionality, put it in a base class and subclass it. Otherwise if you try to do everything with one controller class, you end up with a lot of “switch(_windowType) {…}” stuff, which is a code smell meaning “subclass me!” As others have pointed out, you almost never subclass NSWindow. The only r

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Steve Mills
On Feb 16, 2015, at 09:24:36, Dave wrote: > > Thanks for this, it seems to be saying there is no need for a separate Window > Subclass and that the Window Controller Subclass contains all the code needed > to drive the window. I’m a bit confused of when to use an NSWindow and wh

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Ken Thomases
e Window > Subclass and that the Window Controller Subclass contains all the code needed > to drive the window. It's relatively rare to need to subclass NSWindow. Usually, you can achieve whatever behavior you need with a standard NSWindow or NSPanel and the window's delegate.

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Dave
Hi Ken, Thanks for this, it seems to be saying there is no need for a separate Window Subclass and that the Window Controller Subclass contains all the code needed to drive the window. I’m a bit confused of when to use an NSWindow and when to use and NSWindowController? The way I had thought

Re: NSWindowControllers and NSWindow

2015-02-16 Thread Ken Thomases
On Feb 16, 2015, at 8:17 AM, Dave wrote: > I’ve just started a new Application and I”m wondering what the best/standard > way of setting it up. I recommend that you follow the advice in this article: . Ch

NSWindowControllers and NSWindow

2015-02-16 Thread Dave
Hi All, It’ s been a while since I worked on the Mac as I’ve been mostly in the iOS world lately. I’ve just started a new Application and I”m wondering what the best/standard way of setting it up. My initial thought were to have a WindowController: LTWMainWindowController that looks after a

Re: Regenerating the dock image of a miniaturized NSWindow

2014-12-26 Thread Arjan van Leeuwen
On Fri, Dec 26, 2014 at 11:26 AM, Ken Thomases wrote: > On Dec 26, 2014, at 3:50 AM, Arjan van Leeuwen wrote: > > > After I have called [NSWindow miniaturize], is it possible to refresh the > > miniaturized dock image somehow? I have changing contents in a window, > and >

Re: Regenerating the dock image of a miniaturized NSWindow

2014-12-26 Thread Ken Thomases
On Dec 26, 2014, at 3:50 AM, Arjan van Leeuwen wrote: > After I have called [NSWindow miniaturize], is it possible to refresh the > miniaturized dock image somehow? I have changing contents in a window, and > would like to update the miniaturization to reflect the actual conte

Re: Regenerating the dock image of a miniaturized NSWindow

2014-12-26 Thread Arjan van Leeuwen
I found that I can use [NSDockTile display] to refresh the icon, and it works! Arjan On Fri, Dec 26, 2014 at 10:50 AM, Arjan van Leeuwen wrote: > Hi, > > After I have called [NSWindow miniaturize], is it possible to refresh the > miniaturized dock image somehow? I have changing c

Regenerating the dock image of a miniaturized NSWindow

2014-12-26 Thread Arjan van Leeuwen
Hi, After I have called [NSWindow miniaturize], is it possible to refresh the miniaturized dock image somehow? I have changing contents in a window, and would like to update the miniaturization to reflect the actual contents. I've found [NSWindow setMiniwindowImage], but this only allows

Re: Which NSWindow methods have asynchronous operation?

2014-08-24 Thread Cosmin Apreutesei
nce). > All of the corresponding object and delegate methods having been called? Yes. > All programmatic tests (e.g. -[NSWindow makeKeyWindow] vs. -[NSApplication > keyWindow] and -[NSWindow isKeyWindow], which, by the way, mean different > things) reflecting the changed state? Yes. &g

Re: Which NSWindow methods have asynchronous operation?

2014-08-23 Thread Ken Thomases
On Aug 23, 2014, at 6:27 PM, Cosmin Apreutesei wrote: > I was wondering if anyone knows which of the various NSWindow methods > have asynchronous operation and which are blocking, with their effects > guaranteed after the call? From what perspective? All of the corresponding o

Which NSWindow methods have asynchronous operation?

2014-08-23 Thread Cosmin Apreutesei
I was wondering if anyone knows which of the various NSWindow methods have asynchronous operation and which are blocking, with their effects guaranteed after the call? I'm interested in these in particular: orderFront -- ? orderOut-- ? makeKeyW

Zombie NSWindow

2014-05-08 Thread Tom Doan
I have an app where one of my window types under certain (reproducible) conditions will process the sendEvent for close, I get the windowWillClose notification, the window disappears from the screen, then somehow reappears when I continue execution as a "zombie" window. It's on the Window menu,

Re: NSWindow remember whether showing on re-launch

2014-02-08 Thread Michael Babin
ProgrammingGuide/CoreAppDesign/CoreAppDesign.html#//apple_ref/doc/uid/TP40010543-CH3-SW26 > > Also see the related reference items (NSWindowRestoration protocol, NSWindow > and NSResponder classes). For standard window state (size, position, > visible

Re: NSWindow remember whether showing on re-launch

2014-02-08 Thread Michael Babin
ault > quite easily but figured this has to be a very common task and thought there > must be a standard way to accomplish it. Is there? Have you read the section of the Mac App Programming Guide on UI preservation? User Interface Preservation Also see the related reference items (NSW

NSWindow remember whether showing on re-launch

2014-02-07 Thread Roland King
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 which both shows if it's enabled and acts as a menu item to

Re: NSWindow Level Side Effect - PopUp to Normal

2013-10-29 Thread Caylan Larson
n). However, dragging is not the > only one use case where the main menu breaks the design - it happens when the > window resizes vertically and tries to cross the main menu boundary (user > drag and user zoom gesture). I fixed this problem by adding the following snippet to each chi

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
over my window above the main menu without getting this strange > side-effect? -[NSWindow setLevel:] is documented to order the window to the front of the new level. (So, this would happen even if you were raising a window from a lower level.) "When a window enters a new level, it’s orde

NSWindow Level Side Effect - PopUp to Normal

2013-10-28 Thread Caylan Larson
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 set all windows as NSNormalWindowLevel. Problem is, the new

Re: Audio in WebView stop when close NSWindow

2013-08-23 Thread li shunlian
在 2013-8-24,上午3:34,Nick Zitzmann 写道: > > On Aug 23, 2013, at 11:01 AM, li shunlian wrote: > >> I create a WebView to open a web page and this web page can play audio. When >> I close the NSWindow the audio stop. I open the window again, but the audio >> can n

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

  1   2   3   4   5   6   >