Mantaining legacy APIs in a framework

2015-08-31 Thread Graham Cox
Hi all, a fairly general question. Suppose I have a framework class - e.g. GCBase - that has a public method -foo: Application code that links to the framework can freely subclass GCBase and commonly overrides -foo: Later, I decide that the method would be much better in a different form, let’

Re: Autolayout requiring NSDisableScreenUpdates

2015-08-31 Thread Seth Willits
> On Aug 30, 2015, at 4:09 PM, Ken Thomases wrote: > > Turn off Visible at Launch on the window in the NIB. D'oh! You're right. I mistakenly left on that and that's what was causing it. Thanks! -- Seth Willits ___ Cocoa-dev mailing list (Cocoa-d

Re: Mantaining legacy APIs in a framework

2015-08-31 Thread Jens Alfke
> On Aug 31, 2015, at 4:09 PM, Graham Cox wrote: > > So the framework needs to arrange that if -foo:withBar: wasn’t overridden, > but -foo: was, it should invoke the older override for backward compatibility > until the client code is revised. One way to do it is something like @imple

How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Jens Alfke
(I know this has come up here before, but I can’t get the right combination of search terms to find an answer…) I’m writing a little GUI wrapper app around a command-line-based server. It uses NSTask to launch the server. I want to ensure that when the app exits, the server process exits too. I

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Doug Hill
Hey Jens, I ran across this: Monitoring a Process with a dispatch source "A process dispatch source lets you monitor t

NSTableView: Rows from bottom up

2015-08-31 Thread Eric Gorr
Normally when one adds the first row to a NSTableView, it will appear at the top of the view and additional rows will appear below it. Is it possible to have the first row appear at the bottom of the NSTableView and for new rows to appear above it? No doubt this would require some extensive cus

Re: NSTableView: Rows from bottom up

2015-08-31 Thread Keary Suska
On Aug 31, 2015, at 7:51 PM, Eric Gorr wrote: > > Normally when one adds the first row to a NSTableView, it will appear at the > top of the view and additional rows will appear below it. Is it possible to > have the first row appear at the bottom of the NSTableView and for new rows > to appear

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Scott Ribe
Normally, when a parent exits, all child processes are killed. This is not specific to terminal/tty sessions. However, a process can be detached from its parent so that it will survive the parent's exit. I doubt that NSTask does this, but you should verify. Create a dummy helper: int main() {wh

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Michael David Crawford
On the UNIX command line "nohup" prevents children from being killed when the parent exits. If you want to manually start a daemon: $ nohup mydaemon & Then you can log out and it keeps running. -- Michael David Crawford P.E., Consulting Process Architect mdcrawf...@gmail.com http://mike.so

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Ken Thomases
On Aug 31, 2015, at 9:50 PM, Scott Ribe wrote: > > Normally, when a parent exits, all child processes are killed. This is not true. > This is not specific to terminal/tty sessions. Yes, it is. Try the following program. The parent will print the child's PID and exit (by falling out of main(

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Bavarious
> On Aug 31, 2015, at 20:32, Jens Alfke wrote: > > (I know this has come up here before, but I can’t get the right combination > of search terms to find an answer…) > > I’m writing a little GUI wrapper app around a command-line-based server. It > uses NSTask to launch the server. I want to en