Re: Smooth adjustScroll of NSScrollView

2015-10-27 Thread Nick
Let me explain what I am trying to achieve. Here's my application with an NSScrollView, and it's documentView (which is an NSView subclass) implements a method -(NSRect)adjustScroll:(NSRect)newVisible { NSRect modifiedRect = newVisible; modifiedRect.origin.y = (int)(modifiedRect.origin.

Re: Updated View Bounds After Orientation Change...

2015-10-27 Thread Peters, Brandon
Ken, Thanks. I think I have the idea. I will have to try it when I get home. --Brandon > On Oct 26, 2015, at 23:40, Ken Thomases wrote: > > Read these lines over and over until you see it: > >> On Oct 26, 2015, at 9:49 PM, Peters, Brandon wrote: >> >> (Note: If you're seeing NSAutoresizingM

Re: Smooth adjustScroll of NSScrollView

2015-10-27 Thread Jens Alfke
I’m guessing they wait for the scrolling to finish [not sure how, maybe just polling the scroll position], then use Core Animation to set the scroll position to the nearest grid-line. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas

Re: Hide UINavigationBar and keep UIPageController content static

2015-10-27 Thread Stevo Brock
Hi David and Kyle, Thanks so much for the insight and pointers. I was manually calling setNeedsDisplay() when toggling the navigation bar hidden, and now I can remove that and just set the contentMode to .Redraw. That’s great. And setting the automaticallyAdjustsScrollViewInsets to false help

Re: Updated View Bounds After Orientation Change...

2015-10-27 Thread David Duncan
In general I would highly recommend spending some time with this years Auto Layout talks from WWDC. One of the many gems is the discussion on how to read these logs: > On Oct 27, 201

Re: Hide UINavigationBar and keep UIPageController content static

2015-10-27 Thread Kyle Sluder
On Tue, Oct 27, 2015, at 11:49 AM, Stevo Brock wrote: > Hi David and Kyle, > > Thanks so much for the insight and pointers. > > I was manually calling setNeedsDisplay() when toggling the navigation bar > hidden, and now I can remove that and just set the contentMode to > .Redraw. That’s great. >

How to completely destroy/close a Window

2015-10-27 Thread Dave
Hi, I know I’ve seen a property that controls if a Window’s storage is released etc and the window properly closed or if it just “hides” but I can’t seem to find it? I’ve looked in NSWindowController and NSWindow but I just can’t see it anywhere. I have a NSWindowController and NSWindow Pair a

Re: How to completely destroy/close a Window

2015-10-27 Thread Jens Alfke
> On Oct 27, 2015, at 12:13 PM, Dave wrote: > > I know I’ve seen a property that controls if a Window’s storage is released > etc and the window properly closed or if it just “hides” but I can’t seem to > find it? I’ve looked in NSWindowController and NSWindow but I just can’t see > it anywhe

Dictionary and Range

2015-10-27 Thread Michael de Haan 
I know it is possible to do this, let isolated = Range(start: 20, end: 25) let k_Index = ["isolatedTstm":isolated] But what i really want is this, let foo = <30 and bar = [key:foo] Is that possible? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@

NSFileWrapper - is this really so bad?

2015-10-27 Thread Graham Cox
In XCode 7, I’m getting a new warning when compiling some code that uses NSFileWrapper, due to the addition of the NON_NULL qualifier: Null passed to a callee that requires a non-null argument The code is: NSFileWrapper* fw = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:nil];

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Rick Mann
> On Oct 27, 2015, at 16:24 , Graham Cox wrote: > > In XCode 7, I’m getting a new warning when compiling some code that uses > NSFileWrapper, due to the addition of the NON_NULL qualifier: > > Null passed to a callee that requires a non-null argument > > The code is: > > NSFileWrapper*

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Greg Parker
> On Oct 27, 2015, at 4:24 PM, Graham Cox wrote: > > In XCode 7, I’m getting a new warning when compiling some code that uses > NSFileWrapper, due to the addition of the NON_NULL qualifier: > > Null passed to a callee that requires a non-null argument > > The code is: > > NSFileWrapper

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Graham Cox
> On 28 Oct 2015, at 10:24 AM, Graham Cox wrote: > > due to the addition of the NON_NULL qualifier Actually, I should amend that: it doesn’t have ANY qualifier, so that appears by default to mean that it’s NOT nullable. I’m still getting used to this additional syntax. —G. __

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Quincey Morris
On Oct 27, 2015, at 16:24 , Graham Cox wrote: > > NSFileWrapper* fw = [[NSFileWrapper alloc] > initDirectoryWithFileWrappers:nil]; //<— Null passed to a callee > that requires a non-null argument It’s not necessarily so much about null vs non-null. A side effect of the API aud

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Graham Cox
> On 28 Oct 2015, at 10:53 AM, Alex Kac wrote: > > Have you tried simply passing in a blank dictionary? Is that OK? Yes, that works OK. It’s at least a simple way to shut the warning up, though strikes me as unnecessary and inefficient, FWIW. —G. __

Re: How to completely destroy/close a Window

2015-10-27 Thread Ken Thomases
On Oct 27, 2015, at 2:58 PM, Jens Alfke wrote: > On Oct 27, 2015, at 12:13 PM, Dave wrote: >> >> I know I’ve seen a property that controls if a Window’s storage is released >> etc and the window properly closed or if it just “hides” but I can’t seem to >> find it? I’ve looked in NSWindowContr

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Charles Srstka
> On Oct 27, 2015, at 7:08 PM, Graham Cox wrote: > >> On 28 Oct 2015, at 10:53 AM, Alex Kac > > wrote: >> >> Have you tried simply passing in a blank dictionary? Is that OK? > > > Yes, that works OK. It’s at least a simple way to shut the warning up, though >

Re: Smooth adjustScroll of NSScrollView

2015-10-27 Thread Charles Constant
I don't know if this information can solve your issue directly, but I used it to fix my issue last week. I have a custom NSScroller that had jerky scrolling. I didn't realize that views have an ".animator()" proxy that you can use instead. NSAnimationContext.beginGrouping() NSAnimationContext.curr