Re: NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread Leo
Thanks, I found out what the problem was - but my emails to the list ended up being empty... hmm... another issue to solve? Anyway, in brief: I had NSSplitView's -dividerThickness method defined as a category with some custom thickness - instead of subclassing NSSplitView. Not a good idea,

Re: NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread Leo
___ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:

Re: NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread Leo
___ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:

Re: NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread じょいすじょん
> On 2016 Dec 8, at 9:22, Jens Alfke wrote: > > >> On Dec 7, 2016, at 3:16 PM, Leo wrote: >> >> Any attempt to call it with runModal results with the following errors: >> >> [General] *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for >>

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Quincey Morris
On Dec 7, 2016, at 16:39 , Charles Srstka wrote: > > when I pass nil to UserDefaults’ set(forKey:) method in Swift 3 […] it ends > up writing an NSNull instead of deleting the key […], since the method on > UserDefaults takes an Any? That sounds right. The case where

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Charles Srstka
> On Dec 7, 2016, at 1:00 PM, Quincey Morris > wrote: > > On Dec 7, 2016, at 08:24 , Charles Jenkins > wrote: >> >> If anyone knows how to play music from the library at a low volume, without >> screwing up

Re: NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread Jens Alfke
> On Dec 7, 2016, at 3:16 PM, Leo wrote: > > Any attempt to call it with runModal results with the following errors: > >[General] *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for > empty array >[General] (null) What’s the backtrace? Chances are there’s

Re: NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread Rick Corteza
I’m also having strange issues with NSOpenPanel that I can’t figure out (see my recent question)… > On Dec 8, 2016, at 7:16 AM, Leo wrote: > > Hi all, > > I suddenly discovered a strange issue: > > NSOpenPanel stopped working in some of my apps. > > Any attempt to call

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
> On Dec 7, 2016, at 11:22 AM, Daniel Stenmark wrote: > >> The most relevant looking bug I can find seems to involve pushing & popping >> view controllers. That said, setting the preferredContentSize on the >> navigation controller directly should always work. > >

NSOpenPanel stopped working in some apps on Sierra

2016-12-07 Thread Leo
Hi all, I suddenly discovered a strange issue: NSOpenPanel stopped working in some of my apps. Any attempt to call it with runModal results with the following errors: [General] *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array [General] (null) The problem

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Jens Alfke
> On Dec 7, 2016, at 11:33 AM, Sean McBride wrote: > > I'm not sure I follow. I don't know hardly anything about audio playback, > but converting between bookmarks/paths/URLs is pretty trivial as they all are > basically different representations of the same concept.

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Sean McBride
On Wed, 7 Dec 2016 11:24:24 -0500, Charles Jenkins said: >Originally I did store bookmarks back when my app allowed users to pick >background music from their music libraries. But I could find no way to >play bookmarked library music at a low background volume, so I abandoned >that and just began

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
The most relevant looking bug I can find seems to involve pushing & popping view controllers. That said, setting the preferredContentSize on the navigation controller directly should always work. Setting preferredContentSize directly on the navigation controller works as expected. I’m more

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Quincey Morris
On Dec 7, 2016, at 08:24 , Charles Jenkins wrote: > > If anyone knows how to play music from the library at a low volume, without > screwing up the system volume for other apps, e.g. Music.app, I’d love to > learn it. You can play audio using any volume you want (without any

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
Thanks, David. Unfortunately, UINavigationController isn’t currently an option as it doesn’t reliably bubble up preferredContentSize changes, which we have a strong dependency on and is fairly dynamic in our use case. As of 10.0, it only seems to adapt and forward the very first

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
> On Dec 7, 2016, at 10:28 AM, Daniel Stenmark wrote: > > The UINavigationBar is in the UIPresentationController’s containerView, which > is a subview of the current UIWindow and does NOT have a view controller in > its hierarchy. Is there a particular reason for

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
The UINavigationBar is in the UIPresentationController’s containerView, which is a subview of the current UIWindow and does NOT have a view controller in its hierarchy. Is there a particular reason for UINavigationBar to have this dependency for correct layout? Is there a ‘right’ way to work

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
Its unclear to me at least, but where in the view hierarchy is the UINavigationBar? If it isn’t in a view that is ultimately backed by a view controller, then it won’t have the correct information to do its layout. > On Nov 7, 2016, at 12:42 PM, Daniel Stenmark wrote:

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Charles Jenkins
Sean, Originally I did store bookmarks back when my app allowed users to pick background music from their music libraries. But I could find no way to play bookmarked library music at a low background volume, so I abandoned that and just began using a .wav file stored with the app’s resources. If

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Charles Jenkins
That makes sense. Thanks, Ken! On Wed, Dec 7, 2016 at 11:00 AM, Ken Thomases wrote: > On Dec 7, 2016, at 9:25 AM, Charles Jenkins wrote: > > > > I may be misusing NSUserDefaults. I want to store the name of a > background > > music file, which may be

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Sean McBride
On Wed, 7 Dec 2016 10:25:46 -0500, Charles Jenkins said: >When the app starts up, we call NSUserDefaults.standard.register( [ “bgm” : > ) to default to the real file name, so the user will hear Charles, It's also best practice not to store file names/paths, but instead to store "bookmarks".

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Ken Thomases
On Dec 7, 2016, at 9:25 AM, Charles Jenkins wrote: > > I may be misusing NSUserDefaults. I want to store the name of a background > music file, which may be nil if the user doesn’t want to hear anything. For > the time being, I have only two settings for my variable >

Elementary NSUserDefaults Question

2016-12-07 Thread Charles Jenkins
I may be misusing NSUserDefaults. I want to store the name of a background music file, which may be nil if the user doesn’t want to hear anything. For the time being, I have only two settings for my variable “currentBackgroundMusicFileName”: either a file that I distribute with the app, or nil.