Re: Problem with Auto Layout and drawRect

2015-09-08 Thread Dave
> On 8 Sep 2015, at 01:02, Graham Cox wrote: > > Just a brief comment on the design of your class. Actually it was based on something I found in a book I think and written many moons ago back in the dark ages of CodeWarrior. > Why do you declare properties for frame

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread has
On 07/09/2015 02:11, Jonathan Hull wrote: I am wondering if the compiler feature which might allow this (and several other things) would be to allow implementors of a protocol to adhere to it with a more restrictive type (either a subclass or an implementer/inheritor of a returned protocol).

Progress Bar Gripe

2015-09-08 Thread Michael David Crawford
This isn't specific to any one product nor publisher: It is quite common that non-deterministic progress bars - "barber poles" - are displayed when a deterministic process is taking place such as the download of a file whose size is known ahead of time. To the extent that deterministic progress

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread has
On 06/09/2015 21:50, Charles Srstka wrote: On Sep 6, 2015, at 3:19 PM, Quincey Morris > wrote: (But merely defining a protocol for each of your subclasses is not an improvement here.) It does, however, seem to

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread has
On 06/09/2015 21:19, Quincey Morris wrote: I'm getting that sinking Radar feeling too. But since I'm relatively new to Swift, I'm just holding out a vain hope that there's some sort of solution that's embarrassingly obvious to everyone else but me. I’ve been thinking about the implications

DockTile plugin + Sandbox + App Groups

2015-09-08 Thread Alex Kac
If you have a Docktile plugin - it runs in the com.apple.dock.extra process, not under yours. So it doesn’t have simple access to your NSUserDefaults. If your app is sandboxed and using App Groups for its preferences files, I can’t find any way to get the docktile plugin to actually read a

Arrow Keys in NSSlider

2015-09-08 Thread Raglan T. Tiger
In a window are multiple views. One view contains an NSSlider. I would like to move the slider with arrow keys. I have subclassed NSSlider, added a -keyDown: method,and -acceptsFirstResponder that returns YES. -keyDown is not being called. What more do I need do ? -rags

Re: Arrow Keys in NSSlider

2015-09-08 Thread Lee Ann Rucker
NSSlider does normally respond to keystrokes if you’ve turned on Full Keyboard Access in System Prefs > Keyboard > Shortcuts. If it works with that but not with your changes, it’s doing something complicated you’ll have to adjust for. I’ve only subclassed it to enhance the snapping behavior, I

Handling close with multiple document windows

2015-09-08 Thread David Durkee
I have a document-based application where the documents have a second window, which is used for editing a color list for the document. Originally I just conceived this as a modeless dialog, but recently I wanted to make the document able to handle the Undo command when this window has focus. To

Re: Arrow Keys in NSSlider

2015-09-08 Thread Mike Abdullah
> On 8 Sep 2015, at 21:28, Raglan T. Tiger wrote: > > In a window are multiple views. One view contains an NSSlider. I would like > to move the slider with arrow keys. > > I have subclassed NSSlider, added a -keyDown: method,and > -acceptsFirstResponder that

Re: Arrow Keys in NSSlider

2015-09-08 Thread Quincey Morris
On Sep 8, 2015, at 13:28 , Raglan T. Tiger wrote: > > What more do I need do ? It’s hard to say, but at the very least you’ll actually need to *make* the NSSlider first responder, which means you’ll have to click it first or tab to it. You also don’t say what you

Re: Handling close with multiple document windows

2015-09-08 Thread Quincey Morris
On Sep 8, 2015, at 14:40 , David Durkee wrote: > > I haven’t been able to find a way to make trying to close the main window try > to close the document even if the secondary window is open. Set the ‘shouldCloseDocument’ property of the *main* win controller to YES.

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread Charles Srstka
> On Sep 8, 2015, at 4:43 PM, has wrote: > > Yeah, the goal is for each app-specific glue to subclass the concrete library > classes (which provide the query-building and AE dispatch services using raw > four-char codes, and already work nicely in themselves), then use

Re: Handling close with multiple document windows

2015-09-08 Thread Mike Abdullah
> On 8 Sep 2015, at 22:40, David Durkee wrote: > > I have a document-based application where the documents have a second window, > which is used for editing a color list for the document. Originally I just > conceived this as a modeless dialog, but recently I wanted to

Re: Arrow Keys in NSSlider

2015-09-08 Thread Raglan T. Tiger
Coolio, I will get on these suggestion, thx! -rags > On Sep 8, 2015, at 2:47 PM, Quincey Morris > wrote: > > On Sep 8, 2015, at 13:28 , Raglan T. Tiger wrote: >> >> What more do I need do ? > > It’s hard to say, but at the

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread has
On 08/09/2015 16:38, Charles Srstka wrote: On Sep 8, 2015, at 4:18 AM, has > wrote: But after adding a protocol to supply this information, SourceKit and swiftc crash upon reading the code:[...] That’s true; however, adding a second

NSTextView Question

2015-09-08 Thread Dave
Hi All, I’ve got an NSTextView that’s working in that it Scrolls ok vertically, but If I have a long line, it wraps instead of clipping the line and allowing Horizontal Scrolling. I’ve looked at the properties of the ScrollView and the underlying TextView but I can see no option to have it

Re: Auto Layout, NSScrollView and NSStackView - Adding View to StackView

2015-09-08 Thread Dave
Hi All, > On 7 Sep 2015, at 22:12, Ken Thomases > wrote: > > On Sep 7, 2015, at 3:14 PM, Dave > wrote: > >> Thanks a lot for this. > > You're welcome. There is so little info I

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread has
On 08/09/2015 23:06, Charles Srstka wrote: On Sep 8, 2015, at 4:43 PM, has > wrote: Yeah, the goal is for each app-specific glue to subclass the concrete library classes (which provide the query-building and AE dispatch services using

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread Charles Srstka
> On Sep 8, 2015, at 5:45 PM, has wrote: > > I will need to spend some more time building it out and testing it, but > (touch-wood) it looks like the problem might be cracked at last. Wahey! > > Many, many thanks (you've no idea how nuts this has been driving me), and

NSURLSessionUploadTask and resuming

2015-09-08 Thread James Gale
Hi All, I am working on a Desktop app for OS X 10.9 and above. The application needs to upload files to a storage server that we host. We need to be able to upload files that can be very large (the user with the issue is attempting to upload ~50Gb), sometimes the size of the files means that

Re: Auto Layout, NSScrollView and NSStackView - Adding View to StackView

2015-09-08 Thread Dave
I’ve put a snapshot of my Test Project in a drop box: https://dl.dropboxusercontent.com/u/207696951/LTWALTest1.zip If anyone is interested. All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-08 Thread Charles Srstka
> On Sep 8, 2015, at 4:18 AM, has wrote: > > But after adding a protocol to supply this information, SourceKit and swiftc > crash upon reading the code: > > > protocol Object { > init() > } > > class MyObject { > required init() {} >

Re: NSURLSessionUploadTask and resuming

2015-09-08 Thread Jens Alfke
> On Sep 8, 2015, at 4:05 PM, James Gale wrote: > > What I would like to know is there a way to make the NSURLSessionUploadTask > start from an offset of the file (such as setting a range header), or getting > the NSURLSessionUploadTask with stream to allow me to send

Basics of Cocoa Bindings

2015-09-08 Thread Alex Hall
I've created a new thread, because I obviously don't understand nearly as much about Cocoa Bindings as I thought I did. Adding it to my existing project is just not working out at all, and I think it's because I'm starting with too complex a model and too little comprehension of how bindings

Re: NSTextView Question

2015-09-08 Thread Dave
Hi, Having thought about it a bit more, I think I understand, the problem was that the data I wish to display has two types of data embedded in it. The first type is more of a NSTextView in that it should wrap as necessary as the Text Box Frame changes size and another type that is a list, e.g.

Re: Auto Layout, NSScrollView and NSStackView - Adding View to StackView

2015-09-08 Thread Dave
The Window Screen Shot is at: https://dl.dropboxusercontent.com/u/207696951/dump1.png ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: NSTextView Question

2015-09-08 Thread Dave
Brilliant! Just what I wanted - did the trick wonderfully, thanks again, I would never have thought to look in the Size Panel. BTW, the code is needed, e.g. self.pDetailTextView.textContainer.containerSize = NSMakeSize(FLT_MAX, FLT_MAX); self.pDetailTextView.textContainer.widthTracksTextView =

Re: NSTextView Question

2015-09-08 Thread Ken Thomases
On Sep 8, 2015, at 9:22 AM, Dave wrote: > I’ve got an NSTextView that’s working in that it Scrolls ok vertically, but > If I have a long line, it wraps instead of clipping the line and allowing > Horizontal Scrolling. I’ve looked at the properties of the ScrollView and

Re: Problem with Auto Layout and drawRect

2015-09-08 Thread Ben Kennedy
> On 07 Sep 2015, at 5:02 pm, Graham Cox wrote: > > Also, NSColor is immutable so there’s little purpose to having that property > ‘copy’, it can be ‘retain’ (or ‘strong’) and it will save you a small amount > of space per instance. As Dave said in his reply, isn't

Re: Problem with Auto Layout and drawRect

2015-09-08 Thread David Duncan
> On Sep 8, 2015, at 10:57 AM, Ben Kennedy wrote: > > >> On 07 Sep 2015, at 5:02 pm, Graham Cox wrote: >> >> Also, NSColor is immutable so there’s little purpose to having that property >> ‘copy’, it can be ‘retain’ (or ‘strong’) and it will save you

Re: Basics of Cocoa Bindings

2015-09-08 Thread Jerry Krinock
> On 2015 Sep 08, at 21:04, Alex Hall wrote: > > why are keyPathsForValuesAffecting needed? Is this method taking the > place of something I might do in IB, or is this something different? Of course, they are not required, as many successful apps were written before we