Re: Triggering a segue from code

2016-09-25 Thread mail...@ericgorr.net
Based on stuff I have been playing with, #2 seems like the “right” solution based on the design of the framework. A segue is currently not designed to support this behavior and it is always a mistake, I have learned, to try to fight the framework (which eliminates #1 & #4). > On Sep 25, 2016,

Re: Triggering a segue from code

2016-09-25 Thread Quincey Morris
On Sep 25, 2016, at 11:59 , mail...@ericgorr.net wrote: > > 2. The reason why I do a performClose is because I want it to do the same > thing as when the user presses the close button on the panel, which they are > allowed to do. Unless I were to remove the close button from the inspector > pan

Re: Triggering a segue from code

2016-09-25 Thread mail...@ericgorr.net
Thank you again for your reply Quincey. 1. I have updated the code to keep a reference to the window controller instead of the window as you suggest. As you suspected, the bad behavior does not change. 2. The reason why I do a performClose is because I want it to do the same thing as when the

Re: Triggering a segue from code

2016-09-22 Thread Kyle Sluder
On Sep 22, 2016, at 10:13 PM, Shane Stanley wrote: > >> On 23 Sep. 2016, at 1:17 pm, Kyle Sluder wrote: >> >> -close used to render windows more thoroughly dead > > So can we assume that the close button generally calls -close? No. You can assume it is morally similar to -performClose, but th

Re: Triggering a segue from code

2016-09-22 Thread Shane Stanley
On 23 Sep. 2016, at 1:17 pm, Kyle Sluder wrote: > > -close used to render windows more thoroughly dead So can we assume that the close button generally calls -close? On a tangent here... In Safari, it used to be that if a script asked for the app's windows, -orderedWindows would return a list

Re: Triggering a segue from code

2016-09-22 Thread Quincey Morris
On Sep 22, 2016, at 20:17 , Kyle Sluder wrote: > > And as Eric has discovered, it instructs the > Storyboard runtime to create a new instance of the window controller > rather than unhiding the existing one. Thanks for clarifying this all. I think the upshot of it is that closing a window has a

Re: Triggering a segue from code

2016-09-22 Thread Kyle Sluder
On Thu, Sep 22, 2016, at 02:47 PM, Quincey Morris wrote: > On Sep 22, 2016, at 12:34 , Kyle Sluder wrote: > > > > -close asks the window’s delegate (via -windowShouldClose:) if it should > > close. If the window is owned by a window controller that’s associated > > with a document, the document w

Re: Triggering a segue from code

2016-09-22 Thread Quincey Morris
On Sep 22, 2016, at 12:34 , Kyle Sluder wrote: > > -close asks the window’s delegate (via -windowShouldClose:) if it should > close. If the window is owned by a window controller that’s associated > with a document, the document will also get a chance to weigh in via > -shouldCloseWindowControlle

Re: Triggering a segue from code

2016-09-22 Thread Kyle Sluder
On Mon, Sep 19, 2016, at 10:07 PM, Quincey Morris wrote: > On Sep 19, 2016, at 18:10 , mail...@ericgorr.net > wrote: > > > > The strange behavior I am now seeing is that when I show & hide the panel > > using the buttons are what appears to be two (not three, not fou

Re: Triggering a segue from code

2016-09-19 Thread Quincey Morris
On Sep 19, 2016, at 18:10 , mail...@ericgorr.net wrote: > > The strange behavior I am now seeing is that when I show & hide the panel > using the buttons are what appears to be two (not three, not four, etc.) > different instances of the inspector panel. The autosa

Re: Triggering a segue from code

2016-09-19 Thread mail...@ericgorr.net
Thank you for your reply Quincey. I am definitely getting closer to the behavior I want. Performing the “Show Inspector” segue from the my custom document window controller (WindowController.swift) allows both by regular button and toolbar button to show the Inspector. As you suggested, I als

Re: Triggering a segue from code

2016-09-18 Thread Quincey Morris
On Sep 18, 2016, at 12:22 , mail...@ericgorr.net wrote: > > While I do see the log message 'How do I..', my utility panel is not shown. > > How can I get this work? Most of the problem is that storyboards and segues for the Mac are inadequately documented. This is exacerbated by the fact that u

Triggering a segue from code

2016-09-18 Thread mail...@ericgorr.net
For reference, I have a sample project location at https://github.com/ericgorr/nspanel_show It is a Document Based and Storyboard application. On my main window, I have a toolbar with an Toolbar Item called 'Inspector'. I have defined a segue between this item and my Inspector Utility Panel ca