Re: KVO - deallocation with observers attached

2017-05-31 Thread Ken Thomases
On May 31, 2017, at 5:02 PM, Jonathan Mitchell wrote: > > It is common for deallocating objects to abort if they have observers still > registered. > > However in some cases it seems that an object can get deallocated with > observers attached and not abort. > > I have instrumented my test ca

Re: switching text field between editable and non-editable

2017-05-31 Thread Jonathan Mitchell
> On 31 May 2017, at 21:13, Ken Thomases wrote: > > On May 31, 2017, at 1:51 PM, J.E. Schotsman wrote: >> >> I have a hard time achieving what the message title says. >> Depending on user settings I want a text field to be either editable or >> non-editable. The following works for me. @imp

KVO - deallocation with observers attached

2017-05-31 Thread Jonathan Mitchell
It is common for deallocating objects to abort if they have observers still registered. However in some cases it seems that an object can get deallocated with observers attached and not abort. I have instrumented my test case thoroughly and overridden -setObservationInfo: to log the observatio

Re: switching text field between editable and non-editable

2017-05-31 Thread Ken Thomases
On May 31, 2017, at 1:51 PM, J.E. Schotsman wrote: > > I have a hard time achieving what the message title says. > Depending on user settings I want a text field to be either editable or > non-editable. > > I’ve tried this: > > if makeEditable > { myTextField.isEditable = f

Re: switching text field between editable and non-editable

2017-05-31 Thread Charles Srstka
> On May 31, 2017, at 2:18 PM, J.E. Schotsman wrote: > >> On 31 May 2017, at 20:59, Charles Srstka > > wrote: >> >> Does setting its needsDisplay property to true have any effect? >> >> Charles > > No. I’ve also tried > > myTextField.superview!.setNeedsDispla

Re: switching text field between editable and non-editable

2017-05-31 Thread J.E. Schotsman
> On 31 May 2017, at 20:59, Charles Srstka wrote: > > Does setting its needsDisplay property to true have any effect? > > Charles No. I’ve also tried myTextField.superview!.setNeedsDisplay( myTextField.frame ) in order to get the background redrawn but again I keep seeing the white text b

Re: switching text field between editable and non-editable

2017-05-31 Thread Charles Srstka
> On May 31, 2017, at 1:51 PM, J.E. Schotsman wrote: > > Hello, > > I have a hard time achieving what the message title says. > Depending on user settings I want a text field to be either editable or > non-editable. > > I’ve tried this: > > if makeEditable > { myTextField.

switching text field between editable and non-editable

2017-05-31 Thread J.E. Schotsman
Hello, I have a hard time achieving what the message title says. Depending on user settings I want a text field to be either editable or non-editable. I’ve tried this: if makeEditable { myTextField.isEditable = false myTextField.drawsBackground = fa

Re: Process.launch() in Swift

2017-05-31 Thread Jens Alfke
> On May 31, 2017, at 8:01 AM, David Catmull wrote: > > The documentation for Process.launch() (the equivalent of -[NSTask launch]) > says it "raises an NSInvalidArgumentException if the launch path has not > been set or is invalid or if it fails to create a process", and yet the > function is n

Process.launch() in Swift

2017-05-31 Thread David Catmull
The documentation for Process.launch() (the equivalent of -[NSTask launch]) says it "raises an NSInvalidArgumentException if the launch path has not been set or is invalid or if it fails to create a process", and yet the function is not marked as "throws". So what happens if I call it from Swift an