Re: NSOutlineView isn't restoring persistent state for expanded/collapsed

2017-03-09 Thread Quincey Morris
On Mar 9, 2017, at 09:59 , Steve Mills > wrote: > > When and how should this be happening? FWIW, when I tried to use this persistent state facility (quite a few years ago now), I decided that it was working as advertised, but that the intended behavior

Re: needsDisplay and subviews

2017-03-09 Thread Quincey Morris
On Mar 9, 2017, at 02:24 , Jeremy Hughes wrote: > > that disagrees with Ben’s conclusion: > > "Thus, it seems to follow that so long a custom view's display() calls super, > then all of its subviews should also be drawn when its needsDisplay is true.” I don’t see

Re: needsDisplay and subviews

2017-03-08 Thread Quincey Morris
On Mar 8, 2017, at 15:25 , Jeremy Hughes wrote: > > My conclusion (for now) is that “needsDisplay” causes subviews to be redrawn > - except when “wantsLayer” has been set to true. > > Does that make sense? Sure. In some cases, such as when using layers, the result

Re: Can I use the restore/auto-save loading functions for imports?

2017-03-06 Thread Quincey Morris
On Mar 6, 2017, at 13:58 , Daryle Walker wrote: > > The docs fo “NSDocumentController.reopenDocument(for: withContentsOf: > display: completionHandler:)” mention it’s for app restore. > Do I have to restrict these methods for their documented purposes? I think you do have to

Re: Binding NSTextField to an array

2017-03-06 Thread Quincey Morris
On Mar 6, 2017, at 11:31 , Jeremy Hughes wrote: > > But I wonder if it is possible to bind directly to an array of NSNumbers > without using a wrapper. No, but the reason for that and for the trouble you’ve run into is a bit complicated. First of all, you are

Re: UTI and/or bundle-IDs with small letters

2017-03-02 Thread Quincey Morris
On Mar 2, 2017, at 13:43 , Thaddeus Cooper wrote: > > Specifically the section titled "Testing for Equality and Conformance." I agree with your and Ben’s advice to use UTI-specific equality and conformance testing, but I’d point out that this doesn’t actually resolve

Re: UTI and/or bundle-IDs with small letters

2017-03-02 Thread Quincey Morris
On Mar 2, 2017, at 11:38 , Daryle Walker wrote: > > I’m trying out my document-based Mac app’s data-read routine, and the code it > being skipped. I actually check the typeName (i.e. the UTI) and it doesn’t > match. My bundle identifier for the app has capital letters. I base

Re: Memory-mapped sub-data?

2017-02-27 Thread Quincey Morris
On Feb 27, 2017, at 11:11 , Jens Alfke wrote: > >> On Feb 27, 2017, at 10:02 AM, Chris Ridd > > wrote: >> >> It isn’t NSData, but libdispatch’s dispatch_data_t might be a useful way >> forward. The dispatch_data_create(3) man

Re: KVC Validation w/ custom Formatter not working

2017-02-27 Thread Quincey Morris
On Feb 26, 2017, at 12:40 , Luc Van Bogaert wrote: > > my model class overrides > > validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer, > forKey inKey: String) throws > > After changing the text in the textfield, my validation method is not called.

Re: I think I screwed up Core Data multi-threading rules.

2017-02-25 Thread Quincey Morris
On Feb 25, 2017, at 14:58 , Daryle Walker wrote: > > I thought the entire AppKit, which includes NSDocument, runs only on the main > thread. The exceptions are methods that specially state that they have a > multi-threaded mode. Much stuff in AppKit must be called on the main

Re: NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Quincey Morris
On Feb 25, 2017, at 11:16 , Markus Spoettl wrote: > > My concern is that my packages can get huge in the 100MB to multiple GB range > with hundreds of folders and thousands of individual files inside. Will the > NSDocument storing system/AppKit cope with that? My

Re: NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Quincey Morris
On Feb 25, 2017, at 10:41 , Markus Spoettl wrote: > > I looked at what happens when the application quits and > > - (BOOL)revertToContentsOfURL:ofType:error: > > is called. The absoluteURL passed in is the original file URL. So it's not > surprising that this call

Re: I think I screwed up Core Data multi-threading rules.

2017-02-23 Thread Quincey Morris
On Feb 23, 2017, at 18:25 , Daryle Walker wrote: > >>override func save(to url: URL, ofType typeName: String, for >> saveOperation: NSSaveOperationType, completionHandler: @escaping (Error?) -> >> Void) { >>// Save the message data to the store so any background

Re: Is it possible to set an NSTableView cell background color?

2017-02-22 Thread Quincey Morris
On Feb 22, 2017, at 17:45 , David Delmonte wrote: > > It's cell based! In that case, you need to implement the delegate method "tableView(_:willDisplayCell:for:row:)”, which is called once for each cell that’s redrawn. In your method, you need to verify that the cell is of

Re: Is it possible to set an NSTableView cell background color?

2017-02-22 Thread Quincey Morris
On Feb 22, 2017, at 16:14 , David Delmonte wrote: > > I have a table that has records by date. I want to color those entries based > on the decade. NSCell-based or NSView-based? ___ Cocoa-dev mailing list

Re: Typing into a NSTextView and overriding it

2017-02-20 Thread Quincey Morris
On Feb 20, 2017, at 23:07 , Daryle Walker wrote: > > 1. How can one type in control characters into a text-view? I mean ASCII > range 0 through 31 and 127, not counting horizontal-tab and line-feed. You probably can’t, although it’s not entirely clear. Holding down the Control

Re: Can't restore first responder when restoring window state

2017-02-16 Thread Quincey Morris
On Feb 16, 2017, at 12:43 , David Catmull wrote: > > I looked through the documentation, and didn't see anything that says you > shouldn't call those methods. Well, “encodeRestorableStateWithCoder:" > This method is part of the window restoration system and is called

Re: Can't restore first responder when restoring window state

2017-02-16 Thread Quincey Morris
On Feb 16, 2017, at 11:32 , David Catmull wrote: > > I am explicitly calling encodeRestorableState (in windowWillClose) and > restoreStateWithCoder (in windowDidLoad). You can’t. These methods — assuming you’re talking about overrides in (say) the window controller —

Re: Can't restore first responder when restoring window state

2017-02-16 Thread Quincey Morris
On Feb 16, 2017, at 10:09 , David Catmull wrote: > > I'm working on using encodeRestorableState/restoreStateWithCoder to save > and restore the state of a window. (I'm doing this manually because I want > to explicitly save my window state in the document and not just

Re: Throwing an error from a NSDocument.init override

2017-02-15 Thread Quincey Morris
On Feb 15, 2017, at 00:29 , Daryle Walker wrote: > > Apple’s code will call my versions instead of the ones in NSDocument, right? Yes, because your subclass initializers are (from the Obj-C perspective) overrides, or (from the Swift perspective) the only visible ones for your

Re: Table selection and bindings

2017-02-14 Thread Quincey Morris
On Feb 14, 2017, at 09:25 , Keary Suska wrote: > >> On Feb 14, 2017, at 8:37 AM, John Brownie > > wrote: >> >> Am I doing things incorrectly, or is there something that I can do to ensure >> that the change to the

Re: Throwing an error from a NSDocument.init override

2017-02-14 Thread Quincey Morris
On Feb 14, 2017, at 00:26 , Daryle Walker wrote: > > But I can’t call the “super” versions of those other initializers from within > my override. This is the essence of your problem. Your “override” cannot be a convenience initializer because convenience initializers cannot

Re: Intercept Save when closing NSDocument

2017-02-10 Thread Quincey Morris
On Feb 10, 2017, at 08:12 , Trygve Inda wrote: > > I would like to disable the Save button > for a demo version of our app. Have you looked at the NSSavePanelDelegate methods? One approach would be to use panel:validateURL:error: to prevent the save proceeding.

Re: Argh never-ending troubles with bindings

2017-02-08 Thread Quincey Morris
On Feb 8, 2017, at 17:17 , Rick Mann wrote: > > it's the Managed Object Context that's bound to > "self.representedObject.managedObjectContext". “self.” is unnecessary. AFAIK it’s just voodoo arising from attempts to work around some bug or confusion several years ago.

Re: Argh never-ending troubles with bindings

2017-02-08 Thread Quincey Morris
On Feb 8, 2017, at 16:58 , Rick Mann <rm...@latencyzero.com> wrote: > >> On Feb 8, 2017, at 16:50 , Quincey Morris >> <quinceymor...@rivergatesoftware.com >> <mailto:quinceymor...@rivergatesoftware.com>> wrote: >> >> On Feb 8, 2017, at 15:4

Re: Argh never-ending troubles with bindings

2017-02-08 Thread Quincey Morris
On Feb 8, 2017, at 15:44 , Rick Mann wrote: > > I bind an Array Controller in the View Controller scene to > ViewController.self.representedObject.managedObjectContext. Using what binding key? > Note that I've also tried setting the Array Controller's content binding to

Re: Problem using NSView's scrollRect:by:

2017-01-26 Thread Quincey Morris
On Jan 25, 2017, at 23:37 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > There’s yet something else going on here I tried creating a project with your code, and there is indeed something else going on here: 1. In a default, non-storyboard, non-document macOS

Re: Problem using NSView's scrollRect:by:

2017-01-25 Thread Quincey Morris
On Jan 25, 2017, at 22:59 , Tae Won Ha wrote: > > I've read the documentation, but I thought that to "just" copy a potion of > the NSView's content to somewhere else inside the view, you don't have to do > the second and third part. And I did not quite understand the second

Re: Problem using NSView's scrollRect:by:

2017-01-25 Thread Quincey Morris
On Jan 25, 2017, at 14:13 , Tae Won Ha wrote: > > What I expected was that the red box at the bottom left corner gets > 'copied' to the point (100, 100) when I invoke the triggerScroll action. > However nothing happens. What am I doing wrong? At the very least, you aren’t

Re: Rotary knob with table-like momentum

2017-01-22 Thread Quincey Morris
On Jan 22, 2017, at 18:27 , Eric Dolecki wrote: > > Does anyone have a control (knob) that you can turn with a horizontal swipe, > but snaps to detents. It doesn't travel 360 degrees, but you can throw it and > it rubber bands at its minimum or maximum detent values. I

Re: curious: if not file references, what?

2017-01-20 Thread Quincey Morris
On Jan 20, 2017, at 19:10 , David Young wrote: > > This discussion seems to connect with a question I have had: what's the > "proper" way to refer from a first document to a second document, if > the second document may not have a fixed location in the filesystem? > It sounds

Re: Merging scrolling/clipping with NSStackView

2017-01-20 Thread Quincey Morris
On Jan 20, 2017, at 02:47 , Jonathan Mitchell wrote: > > NSTableView might go something like this: > > @implementation TSTableView > > - (NSSize)intrinsicContentSize > { > NSSize size = [super intrinsicContentSize]; > NSInteger nr = [self

Re: Swift: Draw a circle with tic marks at it's edge?

2017-01-19 Thread Quincey Morris
On Jan 19, 2017, at 05:48 , Eric E. Dolecki wrote: > > However, the position of the ticks > is off. Seems like it needs to be moved down 1/2 way and the same to the > right. The position of the ticks is correct as you calculated, since you calculated relative to the view

Re: Merging scrolling/clipping with NSStackView

2017-01-19 Thread Quincey Morris
On Jan 19, 2017, at 06:39 , Daryle Walker wrote: > > The inner views should be as tall as they need to be. I don’t understand this part. How tall is that? I assume you mean that you want the text and table views to be tall enough to show all of their contents, then stacked

Re: Swift: Draw a circle with tic marks at it's edge?

2017-01-18 Thread Quincey Morris
On Jan 18, 2017, at 12:55 , Eric E. Dolecki wrote: > > When one swipes, it will rotate the control and change the value. I'm just > trying to get the drawing correct. Should the dial be a UIView with its > layer cornerRadius set so it's round, and then create a shape layer

Re: On NSIncrementalStore UUID Uniqueness

2017-01-16 Thread Quincey Morris
On Jan 16, 2017, at 09:08 , Charles Srstka wrote: > > The thing with file reference URLs degrading to file path URLs is in the > Swift is actually not a bug, it’s deliberate > (https://bugs.swift.org/browse/SR-2728 > ). The

Re: making a video from still frames that don't change that often plus audio

2017-01-15 Thread Quincey Morris
On Jan 15, 2017, at 09:22 , davel...@mac.com wrote: > > I have an iOS presentation app > (https://itunes.apple.com/app/redraw/id1114820588?mt=8 > ) that I currently > make videos from by AirPlaying it to my Mac and using Screenflow on the

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Quincey Morris
On Jan 13, 2017, at 10:59 , Sean McBride wrote: > > I'd say the header is in error in the sense that it should have nullability > specified. You may be right, but my post was an *informal* comment in the sense that you seemed to be asking whether a nil parameter value

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Quincey Morris
On Jan 13, 2017, at 09:46 , Sean McBride wrote: > > NSObject.h declares: > > - (BOOL)isEqual:(id)object; > > Note the parameter is not nullable. Did I miss a change in clang that made the default “not nullable”?? I read the above declaration as meaning that the

Re: What do NSArrayController, etc. do for me?

2017-01-13 Thread Quincey Morris
On Jan 13, 2017, at 09:52 , Charles Srstka wrote: > > What does NSObjectController do? Well, not a lot, but what it does is pretty > helpful: There’s one other obscure thing that NSObjectController does (or did, since I don’t know if this situation still exists, but

Re: Opposite of windowDidLoad

2017-01-12 Thread Quincey Morris
On Jan 12, 2017, at 03:46 , Daryle Walker wrote: > > I was thinking of adding a Cocoa Binding during my window-controller's > did-load method. But where would the unbinding go? You’re sort of asking the wrong question. The time to bind or unbind is dependent on the thing

Re: Refreshing Cocoa Bindings

2017-01-11 Thread Quincey Morris
On Jan 11, 2017, at 13:16 , Daryle Walker wrote: > > I'm going to store a reference to a model in a NSViewController's > representedObject field. The various contained views will reference that > field through KVO (Is that possible?) for their bound values. If I change the >

Re: AVSimplePlayer in Swift?

2017-01-08 Thread Quincey Morris
On Jan 8, 2017, at 05:49 , Charles Jenkins wrote: > > changing to CDouble didn’t help This is one of those cases where I regretted pressing “Send” just 2 minutes later. What I wrote was a thought process that didn’t make complete sense. There are 4 possibilities and you’ll

Re: [OT] Testing In-App Purchases

2017-01-08 Thread Quincey Morris
On Jan 7, 2017, at 12:32 , Charles Jenkins wrote: > > I have created a test Sandbox user in iTunes connect, but no matter what I > do, I can’t log in as that user on my device in order to test an in-app > purchase. I have verified the email, logged in to the Apple ID

Re: AVSimplePlayer in Swift?

2017-01-08 Thread Quincey Morris
On Jan 7, 2017, at 13:24 , Charles Jenkins wrote: > > If I take that working code and the ONLY changes I make are to (a) change > currentTime to the code below and (b) add the binding in IB, the video will > not play. The strange thing is when I do this, I think KVO is

Re: Retaining non-document windows

2017-01-04 Thread Quincey Morris
On Jan 4, 2017, at 14:11 , Jean-Daniel wrote: > > When using storyboard, the only way to instantiate window is by getting a > reference to the window controller (by using > -instantiateControllerWithIdentifier:), so it should not be an issue. The problem I was referring

Re: Retaining non-document windows

2017-01-04 Thread Quincey Morris
On Jan 4, 2017, at 02:30 , Daryle Walker wrote: > > I always had to guess how to retain a non-document window. I usually get it > after a bunch of hacking, but I want more official advice. Like I can get > from here. > > I think there are three scenarios: > - a window with 0

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Quincey Morris
On Jan 3, 2017, at 05:00 , Sandor Szatmari wrote: > > Are you suggesting case sensitivity is an issue here? If so, I don't think > so. The template returned from this method uses 'a' as a place holder for > AM/PM. e.g. It might return the string 'h a' as it

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Quincey Morris
On Jan 2, 2017, at 22:16 , Sandor Szatmari wrote: > > There are supported methods using: (works with method 2) >NSString *format = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 > locale:[NSLocale currentLocale]]; >BOOL is24Hour = ([format

Re: My app only shows a black screen in the recent apps list

2016-12-30 Thread Quincey Morris
On Dec 30, 2016, at 13:58 , Carl Hoefs wrote: > > UIApplicationExitsOnSuspend is useful for multi-user professional apps (such > as medical apps associated with hardware). Otherwise there is the potential > of a different user reactivating the app without having

Re: Giving names to undo actions

2016-12-21 Thread Quincey Morris
On Dec 21, 2016, at 00:06 , John Brownie wrote: > > Undoing it is a remove, which sets the name "remove". No, there are three steps: create, undo, redo. You only set the name on the create step. So, after you do the add, the menu reads “Undo Add”. After you undo the add,

Re: device-pixel-exact bitmap rendering

2016-12-18 Thread Quincey Morris
On Dec 18, 2016, at 12:33 , Ken Thomases wrote: > > How did you draw it? It may also be that “drawRect” is not the correct approach, even with “wantsLayer”. As I understand it, there are in general *two* copyings (with two possible scalings) of images drawn in a view.

Re: Checkbox Mayhem

2016-12-18 Thread Quincey Morris
On Dec 18, 2016, at 12:17 , Frank D. Engel, Jr. wrote: > > I had been using @dynamic for object types and @synthesize for basic types > (such as BOOL and int). It seems I will need to create the accessors then > for the basic types as I just tried and @dynamic does not

Re: Is it safe to assume that viewDidLoad() is only ever called once on iOS 8.0+?

2016-12-18 Thread Quincey Morris
On Dec 18, 2016, at 09:18 , Andreas Falkenhahn wrote: > > Reading the documentation again, it now seems to me that views should > be created in loadView() instead. The documentation of loadView() says > that "You can override this method in order to create your views

Re: didPrint selector not called

2016-12-16 Thread Quincey Morris
On Dec 16, 2016, at 12:01 , Jeremy Hughes wrote: > > It’s just an application method, which overrides the method that the system > calls from printDocument when a user chooses Print. Just to be clear, does the “it” in that sentence refer to

Re: didPrint selector not called

2016-12-16 Thread Quincey Morris
On Dec 16, 2016, at 08:45 , Jeremy Hughes wrote: > > override func printDocumentWithSettings(printSettings: [String : AnyObject], > showPrintPanel: Bool, delegate: AnyObject?, didPrintSelector: Selector, > contextInfo: UnsafeMutablePointer) > { > let didPrint

Re: Autolayout warnings

2016-12-14 Thread Quincey Morris
On Dec 14, 2016, at 14:19 , Doug Hill wrote: > >" UIView:0x7f91426d9db0.width == 0.33*UIView:0x7f91426def30.width>", >" H:[UIView:0x7f91426d7f00]-(0)-[UIView:0x7f91426d9db0]>", >" UIView:0x7f91426d9db0.trailing == UIView:0x7f91426d7f00.trailing>", >"

Re: Users default alert sound

2016-12-14 Thread Quincey Morris
On Dec 14, 2016, at 09:45 , Sandor Szatmari wrote: > > I am currently using [NSSound soundNamed:] to play any arbitrary sound. But > I want to play the one configured in System Preferences. You can use the NSBeep () global function to play the configured alert

Re: Control default color inconsistencies

2016-12-14 Thread Quincey Morris
On Dec 14, 2016, at 09:38 , Andreas Falkenhahn wrote: > > But, as I wrote in > my last mail, this default look is pretty confusing and irritating because > background and foreground color aren't consistent at all. You’re assuming that the “default” colors of the various

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 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: return press and edit text

2016-11-30 Thread Quincey Morris
On Nov 30, 2016, at 10:41 , J.E. Schotsman wrote: > > a hit on return acts on both the default button and a text field that is > being edited in the same window. > > The text field gets the event first, then the OK button, which is probably > what the user wants. I must

Re: Vertically Centered Colon

2016-11-29 Thread Quincey Morris
On Nov 29, 2016, at 09:38 , Doug Hill wrote: > > But seriously, why didn’t Apple document what those stylistic alernative type > attribute constants are? Are they supposed to change? Did they not know what > they correspond to when creating the header? Did they not expect

Re: Preserving knowledge of renamed/moved directory?

2016-11-28 Thread Quincey Morris
On Nov 28, 2016, at 17:30 , Charles Srstka wrote: > > This is currently broken in Swift, as of Swift 3, where all file reference > URLs will get silently and unceremoniously converted back to path-based ones > at the bridge. NSURL or URL or both?

Re: Vertically Centered Colon

2016-11-28 Thread Quincey Morris
On Nov 28, 2016, at 07:01 , Gerriet M. Denkmann wrote: > > But in my case I have “21:37:44” where ““21:37” is bold and “:44” is thin. a. Are you using an attributed string whose text is “21:37:44”, or two unattributed strings? b. You have a — I don’t know exactly what to

Re: Swift 3: How to Create CFArray of CGColors?

2016-11-22 Thread Quincey Morris
On Nov 22, 2016, at 16:17 , Charles Jenkins wrote: > > I have this line of code: > > let gradient = CGGradient( colorsSpace: CGColorSpaceCreateDeviceRGB(), > colors: [ clearWhite.cgColor, clearWhite.cgColor, > clearWhite.blendedColorWithFraction(0.5, ofColor: white).cgColor,

Re: observeValueForKeyPath called twice when changing NSUserDefaults value

2016-11-13 Thread Quincey Morris
On Nov 13, 2016, at 14:44 , Steve Mills wrote: > > NSUserDefaults can be observed using Key-Value Observing for any key stored > in it. OK, it’s documented in the header file. > Suggesting that the old/new values in the change dict shouldn't be used is > kinda silly. Why

Re: observeValueForKeyPath called twice when changing NSUserDefaults value

2016-11-13 Thread Quincey Morris
On Nov 13, 2016, at 13:00 , Steve Mills wrote: > > I've added an observer for an NSUserDefaults keyPath. Is this a new thread, or a continuation of the one we had a couple of weeks ago (IIRC)? NSUserDefaults is not documented as KVO compliant for any of its properties. You

Re: WatchKit Noob Question

2016-11-08 Thread Quincey Morris
On Nov 8, 2016, at 04:08 , Charles Jenkins wrote: > > Now that Apple’s docs have been reformatted attractively with plenty of > whitespace, it seems crucial requirements info is often missing. Yes, I agree, both that many useful pieces information are gone or not linked to,

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 19:55 , Rick Mann wrote: > > Xcode never gives you controls for setting a class name Much like the Spanish Inquisition. (Monty Python joke, for those going “Huh?”) ___ Cocoa-dev mailing list

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 19:44 , Rick Mann wrote: > > I can drag out an NSWindow, and I can even change its class to NSPanel, but I > can't set the style. You mean you dragged out a window controller, right? When I do this, I can change the window’s class to NSPanel, and then

Re: Xcode inspector-like tabs?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 19:45 , Rick Mann wrote: > > I just wanted it to do all the heavy lifting there, like a tab controller. Now that I think about it, doesn’t the “toolbar” style of NSTabViewController do what you want? ___

Re: WatchKit Noob Question

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 17:00 , Charles Jenkins wrote: > > What am I doing wrong? What is the error message? And you did import UserNotifications, right? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Xcode inspector-like tabs?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 18:01 , Rick Mann wrote: > > Is there a standard control to implement the Xcode inspector tabs across the > top? My guess is that it’s just a custom view with a series of buttons, with the button status driven by the selected tab of the tabless tab

Re: Creating an NSWindow with utility style in Xcode storyboard?

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 18:28 , Rick Mann wrote: > > Is there no way to make a floating inspector window in a Storyboard in Xcode > 8? What’s preventing you from dragging out a window controller onto the storyboard? However, I would be inclined to put it in its own

Re: Programmatically Clear Dirty NSDocument

2016-11-07 Thread Quincey Morris
On Nov 7, 2016, at 10:46 , Richard Charles wrote: > > This is exactly the same as before but it now works! Regarding that particular mystery, NSChangeUndone decrements the change count. If it happened to be 1 when you tried this, the document would stop being dirty.

Re: Fonts in TableView

2016-11-06 Thread Quincey Morris
On Nov 5, 2016, at 21:44 , Gerriet M. Denkmann wrote: > > NSRect boundingRect = tableFont.boundingRectForFont; > self.outlineView.rowHeight = ceil( boundingRect.size.height ) This is probably a poor choice, for reasons that probably will seem illogical: 1. The

Re: Why does default NSDateFormatter in IB ignore thousands separator?

2016-11-02 Thread Quincey Morris
On Nov 2, 2016, at 09:58 , Sean McBride wrote: > > The "localize format" checkbox is checked by default; the tooltip for that > checkbox says thousands separators should be applied. > In 'System Preferences > Language > Advanced > General' there is a > setting to

Re: Crash in addSubview: when compiled with SDK > 10.9

2016-11-02 Thread Quincey Morris
On Nov 2, 2016, at 10:00 , Konidaris Christos wrote: > Our application crashes inside AppKit when compiled with any SDK > 10.9. The > crash happens at the following point in the program: > > activityPaneController = [[ESC_ActivityPaneController alloc] initWithNibName: >

Re: Prioritizing drawing of the important stuff

2016-10-29 Thread Quincey Morris
On Oct 29, 2016, at 02:37 , Jonathan Taylor wrote: > > The low priority thing only really runs when *nothing* else at all is > happening. This shouldn’t be happening, on most Macs. An average desktop Mac has at least 2 CPU cores (4 logical CPUs), which should

Re: CoreData headaches

2016-10-28 Thread Quincey Morris
On Oct 28, 2016, at 13:20 , Steve Mills wrote: > > the CoreData docs are just a pile of confusion with no human explanation that > I can understand That statement seems to have been garbled in transmission. Let me fix it for you: > CoreData [is] just a pile of confusion with

Re: Date Formatter relative date formatting

2016-10-28 Thread Quincey Morris
On Oct 28, 2016, at 01:05 , Daniel Phillips wrote: > > When using NSDateFormatter for relative date formatting, I am getting the > localised word for today capitalised in some locales not not all. Is this > expected behaviour? Since macOS 10.10 and iOS 8.0, formatters

Re: Traceback from [SFLList removeItem:]

2016-10-27 Thread Quincey Morris
On Oct 26, 2016, at 22:19 , John Brownie wrote: > > Well, when you live in the tropics, you do look forward to cool weather! But > seriously, it's necessary to see family and supporters from time to time. > Having grown up in Australia, snow is still pretty exciting,

Re: View Confusions

2016-10-27 Thread Quincey Morris
On Oct 26, 2016, at 20:15 , Kevin W Pitcher wrote: > > NSDocument loads fine but in the NSWindowController windowDidLoad > self.document is NULL > Where and when can I get at my document data to pass it onto the > NSTabViewController and it’s NSViewController for Binding?

Re: Traceback from [SFLList removeItem:]

2016-10-26 Thread Quincey Morris
On Oct 26, 2016, at 02:22 , John Brownie wrote: > > I assume that I can safely ignore these as someone leaving debug printing on, > since all continues to work. Or do I need to worry? I would worry just a little bit. The messages you showed are not debug printing, but a

Re: EXC_BAD_INSTRUCTION when enumerating /.DocumentRevisions-V100/

2016-10-22 Thread Quincey Morris
On Oct 22, 2016, at 11:42 , Jean Suisse wrote: > > My app should get an access denied error (the enumerator should be nil for > instance). It shouldn’t crash. It can’t return nil, because that is used to signal the end of the enumeration. I agree it’s nasty if it

Re: EXC_BAD_INSTRUCTION when enumerating /.DocumentRevisions-V100/

2016-10-22 Thread Quincey Morris
On Oct 22, 2016, at 10:43 , Jean Suisse wrote: > > while let file = enumerator?.nextObject() as? URL // > EXC_BAD_INSTRUCTION HERE You left out the line that defines “enumerator”. Incidentally, you have this: > let directoryURL = URL(fileURLWithPath:

Re: inconsistencies in view renderings

2016-10-20 Thread Quincey Morris
On Oct 20, 2016, at 09:53 , Alan Snyder wrote: > > If you exclude textured controls in the window content area, then my examples > are all moot. Here’s what the HIG has to say about this

Re: inconsistencies in view renderings

2016-10-19 Thread Quincey Morris
On Oct 19, 2016, at 17:34 , Alan Snyder wrote: > > Do you have a test of a textured button in a textured window that does not > gray out when inactive? (I’m ignoring the fact that textured buttons are not > supposed to be used in the content area.) > > I have

Re: observeValueForKeyPath:... called too often in macOS 12

2016-10-19 Thread Quincey Morris
On Oct 19, 2016, at 00:49 , Gerriet M. Denkmann wrote: > > Before: > > TextField1 bound Value to: > Shared User Defaults Controller > Controller Key = values > Model Key Path = TextField1 > > This worked fine. Yeah, I didn’t realize you were binding to a

Re: observeValueForKeyPath:... called too often in macOS 12

2016-10-19 Thread Quincey Morris
Oo! I see! Here’s the main problem: > On Oct 14, 2016, at 23:08 , Gerriet M. Denkmann wrote: > > My app (macOS 12) observes a value in NSUserDefaults. Well, no, it doesn’t. It observes a value in a NSUserDefaultsController.values. That’s a different kettle of wax.

Re: observeValueForKeyPath:... called too often in macOS 12

2016-10-19 Thread Quincey Morris
On Oct 18, 2016, at 22:33 , Gerriet M. Denkmann wrote: > > I have just done this (can send it to you if you are interested). I’d be interested at looking at it, if you can email it to me. > Bug4: changes not keep on quit > Check:change a TextField; do not use

Re: inconsistencies in view renderings

2016-10-18 Thread Quincey Morris
On Oct 18, 2016, at 19:43 , Alan Snyder wrote: > > Well, try this on Sierra: > > Use the Open File… menu item of Safari to open a dialog. Then activate a > different application. On my system, the Cancel button in the dialog grays > out (although it still looks

Re: inconsistencies in view renderings

2016-10-18 Thread Quincey Morris
On Oct 18, 2016, at 17:58 , Alan Snyder wrote: > > Sounds like you were not using textured rounded buttons, which are the ones > that I wrote about. I tried one of those and one regular button, and the textured rounded didn’t seem to change at all. Note that IIRC

Re: inconsistencies in view renderings

2016-10-18 Thread Quincey Morris
On Oct 18, 2016, at 12:17 , Alan Snyder wrote: > > The implication is that AppKit is probing the application at unspecified > times with a fake event? Well, I had to try it in a test project. I don’t see *any* difference in appearance in the buttons, with

Re: inconsistencies in view renderings

2016-10-18 Thread Quincey Morris
On Oct 18, 2016, at 08:00 , Alan Snyder wrote: > > Is the choice to gray or not to gray when inactive under programmer control? IIRC you can control this by the the value of “acceptsFirstMouse”. The NSView default is NO, but NSButton overrides it to return YES. To

Re: inconsistencies in view renderings

2016-10-18 Thread Quincey Morris
On Oct 17, 2016, at 21:16 , Alan Snyder wrote: > > In IB, when the IB window is inactive, the buttons display in a grayed out > fashion. In the actual application, when the application window is inactive, > the button displays do not change. > > What might be

Re: Xcode 8 causes scroll issue when displaying keyboard

2016-10-11 Thread Quincey Morris
On Oct 11, 2016, at 20:37 , Carl Hoefs wrote: > > I think I may have encountered similar issues. -viewWillAppear: occurs very > early in the view instantiation process, too early for certain things to > execute successfully, and so it's likely that

Re: Swift 3 macOS read keyboard

2016-10-10 Thread Quincey Morris
On Oct 10, 2016, at 16:00 , Eric Dolecki wrote: > > Can I […] set accepts first responder true. Unfortunately, no. It’s a read-only property. > I didn't know I might need to use subclassing to capture key events. Perhaps it can be regarded as an old-school paradigm. It is

Re: Swift 3 macOS read keyboard

2016-10-10 Thread Quincey Morris
On Oct 10, 2016, at 15:07 , Graham Cox wrote: > > NSWindow, NSWindowController and NSView, NSViewController all inherit from > NSResponder, which provide standard methods for dealing with keyUp and > keyDown events. I agree with everything you said, but a bit of

<    1   2   3   4   5   6   7   8   9   10   >