Re: Who owns a child view controller?

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 03:50 , Jeremy Hughes wrote: > > I’m still not entirely clear on when autorelease pools are used in Swift. I think about it this way: Autorelease is the run-time feature that provides an atomic return. There is no such thing as an “atomic” return naturally built into in any

Re: Who owns a child view controller?

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 03:32 , Jeremy Hughes wrote: > > one might argue that safe unowned objects could be replaced by > unowned(unsafe) objects in release code It’s highly desirable not to do that, because it’s the bugs that show up in release code that are the hardest to find. In fact, Swift h

Re: NSAccessibility

2017-07-13 Thread Quincey Morris
On Jul 13, 2017, at 10:17 , Tom Doan wrote: > > it looks like NSAccessibilityStaticText was added with 10.10. > > My problem is that setAccessibilityElement is never called explicitly by > SCIContentView That seems to make it a bug in Scintilla. Does it actually support macOS prior to 10.10?

Re: Who owns a child view controller?

2017-07-13 Thread Quincey Morris
On Jul 13, 2017, at 02:57 , Jeremy Hughes wrote: > > When to use unowned rather than weak Here’s how I understand the situation in Swift. As usual, I may have some things a bit wrong, but I think this is right. There are four kinds of reference variable (or stored property) in Swift: 1. Stron

Re: Who owns a child view controller?

2017-07-12 Thread Quincey Morris
On Jul 12, 2017, at 16:19 , Greg Parker wrote: > > "Unowned" means something else in Swift. I suppose. I guess I’ve internalized “unowned” to mean “unretained but crashes tidily” in Swift, but “unretained and crashes as messily as possible” in Obj-C. :) Plus, Swift has “unowned(unsafe)” which

Re: Who owns a child view controller?

2017-07-12 Thread Quincey Morris
On Jul 12, 2017, at 14:57 , Jeremy Hughes wrote: > > I’m trying to understand memory management so I can avoid retain cycles and > other issues. There’s nothing wrong with trying to understand. The bet you will (almost always) lose is one involving reasoning about *when* retain counts reach p

Re: Who owns a child view controller?

2017-07-12 Thread Quincey Morris
On Jul 12, 2017, at 13:59 , Steve Christensen wrote: > > It's also possible that, as an implementation detail, AppKit isn't > disconnecting the view controller's view from the view hierarchy until it > gets around to doing all the other view processing like redraws. If so then > the view could

Re: ANN: New unofficial developer mailing lists

2017-07-08 Thread Quincey Morris
On Jul 8, 2017, at 20:45 , Roland King wrote: > > wondered if this list is still working today - we got the ‘goodnight to all’ > message on xcode yesterday, not that I’ve tried it. Apple hasn’t shut this one down, and there hasn’t been a notification like there was for code-users. __

Re: Increasing stack size of NSDocument's open file thread

2017-07-07 Thread Quincey Morris
On Jul 6, 2017, at 22:34 , Graham Cox wrote: > > So… unless someone has any bright ideas (or has even read this, very > unlikely), I’ll ponder some more. You didn’t look into Jens’s first suggestion: “This.” In other words, keep the recursion but use more than one thread. What suggested itsel

Re: Very slow NSTableView

2017-07-04 Thread Quincey Morris
On Jul 4, 2017, at 18:23 , Graham Cox wrote: > > However, as of the latest documentation I can find, cell-based tables are not > exactly deprecated. They’re just treated as the embarrassing brother no-one > talks about, which is not quite the same thing: I was basing it on this pages like this

Re: Very slow NSTableView

2017-07-04 Thread Quincey Morris
On Jul 4, 2017, at 05:02 , Graham Cox wrote: > > But it’s still spending an excruciating amount of time rendering the title of > the pop-up button, but most of it is in the mysterious rgba64_DAplusdDA > function. This is called twice for each pop-up button rendered, and the time > divides fair

Re: Very slow NSTableView

2017-07-04 Thread Quincey Morris
On Jul 4, 2017, at 01:02 , Graham Cox wrote: > > Is NSTableView documented anywhere to require layer backing? Not that I know of. A couple of things to keep in mind: — This thing about the dramatic effect *might* be specific to NSCell-based table views (i.e. in a sense they no longer care abo

Re: Very slow NSTableView

2017-07-04 Thread Quincey Morris
On Jul 4, 2017, at 00:18 , Graham Cox wrote: > > Is there a way to opt-out of vibrancy for an entire table view? There’s no clear indication that the performance problem has anything to do with vibrancy. In both cases, the “expensive” call was about transparency, which could just be about comp

Re: Very slow NSTableView

2017-07-03 Thread Quincey Morris
On Jul 3, 2017, at 18:19 , Graham Cox wrote: > > slow. as. molasses. What does Instruments say it’s doing? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 10:26 , Sean McBride wrote: > > Does anyone know what NSWindow's initWithContentRect: behaviour is with > non-integer contentRect? Not really, but is there a reason why you can’t just try it? My guess would be that the window’s backing store would be pixel- or point-aligne

Re: Focus ring of NSComboBox and text field visible through overlaid views

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 08:07 , Navneet Kumar wrote: > > I also have a small project uploaded […] > > Which shows both the focus ring problem and tooltip problem I don’t know why, but the focus ring doesn’t bleed through for me (Xcode 9, macOS 10.12). However, I think your solution in the test pr

Re: NSDocument willPresentError(_:) in Swift 4 : Override not called

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 06:03 , Jerome Krinock wrote: > > To be honest, most of the time, I don't really *write* Swift. I throw some > characters onto the screen and click “Fix” You’re Doing It Wrong™. You’re supposed to throw fewer characters onto the screen and press Return to autocomplete. Us

Re: NSDocument willPresentError(_:) in Swift 4 : Override not called

2017-06-29 Thread Quincey Morris
On Jun 29, 2017, at 22:37 , Jerome Krinock wrote: > > Is my syntax correct? I think so. You would get an error trying to declare the override if it did not have the correct method signature. In what class are you doing the “presentError” invocation? Do you have any evidence (or can you verify

Re: UITableViewController

2017-06-29 Thread Quincey Morris
On Jun 29, 2017, at 01:05 , Gerriet M. Denkmann wrote: > > and also the Container View has: > Triggered Segues > viedDidLoad TableViewController Embed I have the same thing, so I don’t know what’s different. > What I do not understand: Container View is a UIView, which does not have > viedDi

Re: UITableViewController

2017-06-28 Thread Quincey Morris
On Jun 28, 2017, at 22:02 , Gerriet M. Denkmann wrote: > > I had to do two more steps: > > 1. give the segue an identifier, like: “EmbedSegueToTableViewController” > > 2. in the UITableViewController which formerly did have a UITableView and now > has the container view: > > - (void)viewDidLo

Re: UITableViewController

2017-06-28 Thread Quincey Morris
On Jun 28, 2017, at 01:38 , Gerriet M. Denkmann wrote: > > I did just that. Not quite … > I have a Master View Controller Scene with a MasterViewController ← > UIViewController (which previously had a TableView, now has a UIView, called > “Container View” ); it now also has: > containerView →

Re: UITableViewController

2017-06-28 Thread Quincey Morris
On Jun 28, 2017, at 00:21 , Gerriet M. Denkmann wrote: > > Ok, so I removed my TableView from the scene and tried to drag a > UITableViewController into its place. > But Xcode would not allow this. > > So: must a UITableViewController the only (or the top) thing in a scene? > Or am I just doing

Re: Focus ring of NSComboBox and text field visible through overlaid views

2017-06-27 Thread Quincey Morris
On Jun 27, 2017, at 06:57 , Navneet Kumar wrote: > > A custom view when overlapped with a transparent view (subview to window’s > contentView) and a subview on top of transparent view, also shows the custom > cursor and tooltip assigned to the custom view. Even when the custom view’s > trackin

Re: Is cloning the same as copying in APFS?

2017-06-26 Thread Quincey Morris
On Jun 26, 2017, at 19:17 , Sandor Szatmari wrote: > > Are you talking about just a regular old copy or a copy in the sense of a > time machine backup? Are these behaviors different on APFS? Yes and no. A regular old copy will create metadata for a new file, and point back to the data blocks

Re: Doubled Pixels

2017-06-25 Thread Quincey Morris
On Jun 25, 2017, at 21:28 , Gerriet M. Denkmann wrote: > >> On 26 Jun 2017, at 08:03, Graham Cox > > wrote: >> >> Well, it depends on what you want to do with the image. If it’s content that >> gets displayed or printed, then calibrated ensures that it will look t

Re: AVCaptureMovieFileOutput + encryption

2017-06-23 Thread Quincey Morris
On Jun 23, 2017, at 12:02 , Jens Alfke wrote: > > swallow your iPhone and it will take glorious HD video of your digestive > tract all the way down Pro-tip: It goes down easier if you put it in airplane mode. ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: AVCaptureMovieFileOutput + encryption

2017-06-23 Thread Quincey Morris
On Jun 23, 2017, at 10:51 , Carl Hoefs wrote: > > it analyses specific processes in the body which are indicative of a certain > pathology It scans for developers who type spaces instead of tabs??? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: Embedded Collection View Controller scrolling issue

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 23:45 , Doug Hill wrote: > > I'm still looking for other ways to track this down. I think you’re going to have to submit a bug report or use a TSI to get Apple to tell you what to do. ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: Embedded Collection View Controller scrolling issue

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 16:22 , Doug Hill wrote: > > The embedded collection view will only scroll if I drag on the area of the > collection view that is originally visible. Can you clarify this a bit? Are you talking about the autoscrolling that happens when you drag-select, or scrolling that hap

Re: NSTimer or what?

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 20:04 , Gerriet M. Denkmann wrote: > > What is the most efficient (energy-wise) way to do this: > > NSTimer (with tolerance) > NSRunLoop performSelector:target:argument:order:modes: > NSObject performSelector:withObject:afterDelay: > GCD dispatch_af

Re: Cursor outside Rect without polling

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 20:17 , Gerriet M. Denkmann wrote: > > 1. if the cursor is initially NOT in the rect, the app does not get notified: > Workaround: user moves cursor into the rect (not very good). > > 2. if the app is hidden under some other windows, it also does not get > notified. > Workar

Re: Converting a Storyboard into separate NIBs.

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 11:31 , Dave wrote: > > I think it would be better to move to NIBs now before wasting anymore time > trying to get Storyboards to work. I don’t honestly understand why you think this is going to make anything easier. With storyboards, you *are* using NIBs, behind the scenes

Re: Help with Storyboard Problem

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 11:24 , Dave wrote: > > I’ve tried using Segues but can’t get that to work You haven’t said what “can’t get that to work” means. What do you expect? What happens? What does your view controller hierarchy look like. > so instead of setting myView = > call: > [self presentVie

Re: Annual codesign pain point

2017-06-18 Thread Quincey Morris
I dunno, but I two things jump out at me: On Jun 18, 2017, at 20:06 , Graham Cox wrote: > > 2017-06-19 02:52:16 + Disqualifying 0x7ff548966ae0; name='3rd Party Mac Developer Installer: REDACTED, LLC > (V55NQN)’, […] This is a Mac App Store certificate. If it’s “disqualifying” it only

Re: Release mode bindings crash and release pools

2017-06-16 Thread Quincey Morris
On Jun 16, 2017, at 14:41 , Jonathan Mitchell wrote: > > I sometimes use the default NSObject bind: to set up a simple one way > operation as you describe as opposed to a discrete observation. With macOS 10.13, the new block/closure-based KVO “addObserver” method is probably an easier way, alt

Re: Release mode bindings crash and release pools

2017-06-16 Thread Quincey Morris
On Jun 16, 2017, at 13:48 , Charles Srstka wrote: > > This is incorrect. It’s incorrect as a 2-way binding, but it works as a pair of so-called 1-way bindings, with the proviso that they may need to be unbound manually, to prevent reference cycles, which it sounds like is what Jerry is doing.

Re: Release mode bindings crash and release pools

2017-06-16 Thread Quincey Morris
On Jun 16, 2017, at 08:15 , Jerome Krinock wrote: > > Typically the only reason you would explicitly unbind an object is if you > modify the user interface programatically and want to remove a binding. If > you change an objects binding’s values it should first clear any preexisting > values.

APFS

2017-06-15 Thread Quincey Morris
FWIW, the WWDC session on APFS is worth watching: https://developer.apple.com/videos/play/wwdc2017/715/ because it relates to an inconclusive discussion we had recently about iOS file names with normalization issues “breaking” exis

Re: Choosing view controller for segue

2017-06-15 Thread Quincey Morris
On Jun 15, 2017, at 14:06 , Steve Mills wrote: > > I'm not sure how to add a 2nd one from a common source. When I try > right-dragging from the embedding view to the 2nd target VC, it deletes the > segue already wired to the 1st target VC. Well, you can’t have a second embedding if it’s an emb

Re: Choosing view controller for segue

2017-06-15 Thread Quincey Morris
On Jun 15, 2017, at 12:45 , Steve Mills wrote: > > What's the best way to programmatically choose which view controller will be > used to segue to? The storyboard was initially set up to segue to a > particular view controller, but now I want to choose a different target > depending on a user

Re: Release mode bindings crash and release pools

2017-06-15 Thread Quincey Morris
On Jun 15, 2017, at 12:55 , Jonathan Mitchell wrote: > > The NSViewController is calling its internal implementation that removes > itself from the responder chain - _removeFromResponderChain > This method calls [NSWindow nextResponder] and the crash occurs there as the > NSWindow is a zombie.

Re: Release mode bindings crash and release pools

2017-06-15 Thread Quincey Morris
On Jun 15, 2017, at 04:46 , Jonathan Mitchell wrote: > > The crash occurs when the pool gets drained. > Wrapping my -bind: calls in a release pool solves the issue too. The information you’ve provided doesn’t make a lot of sense by itself. If draining an autorelease pool is leading to a crash

Re: iOS Drag and Drop

2017-06-14 Thread Quincey Morris
You realize you need Xcode 9 and iOS 11 for drag-and-drop, right? > On Jun 14, 2017, at 03:14 , Dave wrote: > > I’m only on XCode 8.3.2 and I can’t update at the moment because I have a > VERY slow and flakey Internet Connection. ___ Cocoa-dev maili

Re: How to validate Core Data attributes ? (example in official doc doesn't work)

2017-06-14 Thread Quincey Morris
On Jun 13, 2017, at 23:54 , Glen Huang wrote: > > what do you use instead of Core Data? I ended up writing my own object graph framework. Interestingly, many parts of the implementation fell naturally into the same mechanisms Core Data uses (such as having client-facing and primitive versions

Re: How to validate Core Data attributes ? (example in official doc doesn't work)

2017-06-13 Thread Quincey Morris
On Jun 13, 2017, at 23:32 , Glen Huang wrote: > > n my case, the location attribute is actually defined on a parent entity > (let's call it Parent), and it has two child entity (Child1 and Child2), I > want location to be optional for Child1 but not for Child2. So I made > location to be optio

Re: How to validate Core Data attributes ? (example in official doc doesn't work)

2017-06-13 Thread Quincey Morris
On Jun 13, 2017, at 19:10 , Glen Huang wrote: > > In the Core Data Xcode editor, I enabled optional for this attribute, but I > expect this method will prevent the object from being saved when the it's > location isn't set I don’t understand this. If you made the “location” attribute optional,

Re: How To Install El Capitan From Sierra?

2017-05-30 Thread Quincey Morris
On May 30, 2017, at 12:32 , Richard Charles wrote: > > you can […] select [bootable media from older installers] as your start up > disk from within macOS Sierra Not if this Mac is newer than the older macOS. (Think about hardware-level drivers.) __

Re: How To Install El Capitan From Sierra?

2017-05-30 Thread Quincey Morris
On May 30, 2017, at 12:07 , Richard Charles wrote: > > Once you do get the installer you can do this to create bootable media for > 10.9 and up. One other thing to keep in mind is that you can’t install a version that’s older than the one that came with the Mac you’re trying to install it on.

Re: Customizing UIPageViewController during init

2017-05-24 Thread Quincey Morris
On May 24, 2017, at 08:17 , Steve Mills wrote: > > Is it wrong to call two different init methods? Yes, I think you have to regard it as wrong. Apart from hidden weird behavior, it risks memory management problems, because init methods generally (should) refer to instance variables, not proper

Re: Auto Layout Question

2017-05-24 Thread Quincey Morris
On May 24, 2017, at 08:52 , Dave wrote: > > Maybe I am going about this in the wrong way? Using stack views seems like the hard way. Why can’t you apply constraints directly to the 4 views? I’d suggest adding constraints to the labels to center them over their graphic views, with a fixed vert

Re: scrolling woes

2017-05-20 Thread Quincey Morris
On May 20, 2017, at 12:01 , J.E. Schotsman wrote: > > I am happy with the result except that I cannot set the placeholder text now. If the text is not editable, then a text view is a better choice than a text field, but it should probably be bordered and maybe have a different background color

Re: scrolling woes

2017-05-20 Thread Quincey Morris
On May 20, 2017, at 06:00 , J.E. Schotsman wrote: > > I had a text field within a tab view item whose text was getting too large. Too large, as in: there are multiple lines of text whose total vertical height exceeds the height of the text field? > So I embedded it in a scroll view. No matter

Re: Exporting a public key from the secure enclave

2017-05-15 Thread Quincey Morris
On May 15, 2017, at 14:08 , Doug Hill wrote: > > Also, the Security developer forum has held up my forum post for moderation > for almost 4 days. You really should ask Quinn (the Eskimo). The moderation was probably due to the external GitHub link. Try removing the “https” and “://“. People wi

Re: View based outline view checkboxes not showing state when window is not front most

2017-05-08 Thread Quincey Morris
On May 8, 2017, at 05:20 , Navneet Kumar wrote: > > If a checkbox is checked, it starts showing as unchecked the moment the > window gets in background. What platform? What mechanism are you using to provide the checkbox value generally? ___ Cocoa-

Re: NSDocument autosavesInPlace and additional menu items

2017-05-03 Thread Quincey Morris
On May 3, 2017, at 08:03 , Eyal Redler wrote: > > my menu nib contains "Save" and "Save As...” items What is the IB action associated with your Save As item? It’s not clear how Cocoa recognizes the menu item, but the action seems like the likely mechanism. Or it could be by standardized name,

Re: NSSplitView Problems

2017-05-03 Thread Quincey Morris
On May 3, 2017, at 09:27 , Richard Charles wrote: > > So it appears that simply allowing the the size of a subview to go negative > when autoresizing fixes an issue that has been around since the days of > NeXTSTEP. So what am I missing? I dunno, but I think you need to be a bit cautious with

Re: Weird pointer change...

2017-04-27 Thread Quincey Morris
On Apr 27, 2017, at 15:27 , Peter Hudson wrote: > > This is a document based app. > And it's the same table view that is affected each time. […] And I find it > strange that the table view address should become exactly the same as it had > in a previous document that has been closed. I’m sor

Re: Weird pointer change...

2017-04-27 Thread Quincey Morris
On Apr 27, 2017, at 13:26 , Peter Hudson wrote: > > I open I file in my application, do a few typical operations in it - and then > shut the file. I assume you mean this is a data file whose contents are displayed (for the moment) in your UI, not an actual NIB file containing a table view? >

Re: Translating KVO-ed property to Swift

2017-04-24 Thread Quincey Morris
On Apr 24, 2017, at 10:11 , Charles Srstka wrote: > > What Quincey seemed to be referring to was a property that was not backed by > any kind of persistent value. That wasn’t actually the kind of property I had in mind. I was thinking of settable, computed properties that did not depend on the

Re: iOS TableView moving down

2017-04-23 Thread Quincey Morris
On Apr 22, 2017, at 23:55 , Gerriet M. Denkmann wrote: > > But now I want to move the table view down 1 cm (leaving 1 cm unused space at > the top of the screen above the table view). > Reason: top of the table view (which contains a SearchField) is rather hard > to reach. > > But I cannot fin

Re: Translating KVO-ed property to Swift

2017-04-20 Thread Quincey Morris
On Apr 20, 2017, at 10:24 , Charles Srstka wrote: > > I mean, yes, we could go all the way down to explaining how everything works > in terms of the physics and chemistry of electrons and semiconductors, but > that wouldn’t be very practical, would it? I subscribe to the principle already quot

Re: Translating KVO-ed property to Swift

2017-04-19 Thread Quincey Morris
On Apr 19, 2017, at 15:49 , Charles Srstka wrote: > > Cocoa automagically does its secret subclass thing to wrap the setter and > call the didChange/willChange calls for any property you didn’t tell it not > to do. It needs the property to be dynamic for this to work. Yes, that’s almost exact

Re: Translating KVO-ed property to Swift

2017-04-19 Thread Quincey Morris
On Apr 19, 2017, at 10:56 , Charles Srstka wrote: > > 2. Stored properties need to call willChangeValue(forKey:) and > didChangeValue(forKey:). > a. In most cases, just add “dynamic” to the property declaration, and > Cocoa will automagically insert the needed calls. The problem with say

Re: Translating KVO-ed property to Swift

2017-04-17 Thread Quincey Morris
On Apr 17, 2017, at 12:03 , Charles Srstka wrote: > > You cannot guarantee that the property will be called via objc_msgSend, which > is important if you’re relying on the swizzled accessor to send the property > notifications. If you’re sending them yourself, it doesn’t matter one way or > an

Re: Translating KVO-ed property to Swift

2017-04-17 Thread Quincey Morris
On Apr 17, 2017, at 05:40 , Jean-Daniel wrote: > This is a good practice, but I don’t think this is required for computed > property, especially if you take care of willChange/didChange manually, as > the OP does. Here is what the Swift interoperability documentation says (https://developer.a

Re: Translating KVO-ed property to Swift

2017-04-17 Thread Quincey Morris
On Apr 17, 2017, at 01:43 , Jean-Daniel wrote: > > var version: String? { A slight correction: this declaration actually must be: > dynamic var version: String? { otherwise KVO isn’t guaranteed to work in Swift. ___ Cocoa-dev mailing list (Cocoa-d

Re: Translating KVO-ed property to Swift

2017-04-17 Thread Quincey Morris
On Apr 17, 2017, at 01:24 , Rick Mann wrote: > > I have a number of properties in Objective-C written like this, > short-circuiting notifications when the value doesn't change: Not in this code you don’t, unless you have a “automaticallyNotifiesObserversOfVersion” method returning false elsewh

Re: Xcode Cocoa Windows

2017-04-13 Thread Quincey Morris
On Apr 13, 2017, at 03:04 , LAURENT Charles wrote: > > How to proceed next to get a single window ? Delete the storyboard, then create a new file for your project. In the file-type dialog, choose Application from the UI section, and you’ll get a XIB file like the one that the templates us

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-11 Thread Quincey Morris
On Apr 11, 2017, at 08:32 , Navneet Kumar wrote: > >> 4. Anti-aliasing. There is some behind the scenes magic when drawing text, >> that determines whether it knows the background color and therefore whether >> it anti-aliases using the background color. >> > Tried anti-aliasing, explicitly tu

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Quincey Morris
On Apr 10, 2017, at 11:20 , Navneet Kumar wrote: > > Actually I’m using text fields for simplicity at a lot of places. And > drawInRect: at some places, in order to vertically centre the multi-line text > more conveniently. Here are some possibilities to consider: 1. Shadow. What happens if y

Re: What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-07 Thread Quincey Morris
On Apr 7, 2017, at 16:24 , Daryle Walker wrote: > > I first tried overriding “prepareForReuse” in my text-field subclass, but it > never stuck. It’s never going to be called for that view, because the table view doesn’t know anything about it. You have to override it in a NSTextCellView subcla

Re: What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-07 Thread Quincey Morris
On Apr 7, 2017, at 07:24 , Daryle Walker wrote: > > Does anyone have any ideas how to do this a runtime? I need to intercept when > a table cell is created so I can either change its font property or set a > font binding. Do you implement tableView:viewFor:row: in your delegate? That’s the (we

Re: Question about tvOS and the Apple TV remote

2017-04-06 Thread Quincey Morris
On Apr 6, 2017, at 06:29 , Eric E. Dolecki wrote: > > I just made a sample tvOS app and I couldn't import Intents for it. There is > no SiriKit for tvOS - Sorry, I misread your original message, and thought you were asking about iOS. > so I still wonder if I do a "Find kittens on YouTube" - ho

Re: Reference to embedded view controller in IB?

2017-04-06 Thread Quincey Morris
On Apr 6, 2017, at 14:55 , Kyle Sluder wrote: > > It is not called for all segues, but it should be called for embed > segues created by dragging out a Container View from the Object Library. I was wondering about this, like Jean-Daniel was, so I just tried it in an existing Mac project, and th

Re: Reference to embedded view controller in IB?

2017-04-05 Thread Quincey Morris
On Apr 5, 2017, at 14:06 , Doug Hill wrote: > > Let's say, views are in position 1, 2, and 3 and I want to configure 1, 2, > and 3 differently based on their position. The simplest way would be to set a different tag on each view, and distinguish between them using “viewController.view.tag”.

Re: Reference to embedded view controller in IB?

2017-04-05 Thread Quincey Morris
On Apr 5, 2017, at 13:42 , Doug Hill wrote: > > Can this be done? Are there other ways to get a reference to the embedded > view controller at runtime? I believe you’ll find the embedded view controller in the root view controller’s “childViewControllers” array property. _

Re: Auto-layout: how do I make the other side "win"?

2017-04-03 Thread Quincey Morris
On Apr 3, 2017, at 08:57 , Daryle Walker wrote: > > When I select the window in the window controller’s scene in the storyboard, > its content size is 800x450. It doesn’t show that way on app run. The view > that’s connected to it, a split-view (top & bottom), is still set to the > default 450

Re: Auto-layout: how do I make the other side "win"?

2017-04-01 Thread Quincey Morris
On Apr 1, 2017, at 12:07 , Daryle Walker wrote: > > I got a feeling that, since the interior of the window and the exterior of > the view are probably bound, that the auto-layout system is choosing the > view’s smaller size over the window’s bigger one. How do I reverse this? Or > do I have to

Re: Normalisation of filenames

2017-04-01 Thread Quincey Morris
On Apr 1, 2017, at 04:41 , Gerriet M. Denkmann wrote: > > for different values of path I got: > path = @“/ก่ี”; // consonant + mark + vowel → same = YES > path = @“/กี่”; // consonant + vowel + mark → same = YES > > Note: these two paths also look identical in Finder. > >

Re: Question about tvOS and the Apple TV remote

2017-03-31 Thread Quincey Morris
On Mar 31, 2017, at 12:12 , Eric E. Dolecki wrote: > > How is this done? I would like to add this functionality to my tvOS > application. I think you’re looking for this: developer.apple.com/reference/intents And of course there’s video:

Re: Can't use +initialize, now what?

2017-03-29 Thread Quincey Morris
On Mar 29, 2017, at 06:57 , Daryle Walker wrote: > > Sometimes, I see something in Apple’s AppKit/Foundation reference site that > mentions that their technique should be loaded early in the program by > putting it in the class’s “+initiallize” method. So there are actually two distinct cases.

Re: Where can I write in Undo/Redo action titles?

2017-03-27 Thread Quincey Morris
On Mar 27, 2017, at 16:25 , Daryle Walker wrote: > > The problem is that you’re traditionally supposed to put the names of actions > during the action so Undo/Redo can add them to their menu label. That’s not quite true. By default, *all* of the undo actions registered during the current itera

Re: How to debug crash in NSOperation?

2017-03-27 Thread Quincey Morris
On Mar 26, 2017, at 22:04 , Gerriet M. Denkmann wrote: > > [ arrayOfStrings writeToFile: “directoryPath/SortedKeys.plist” atomically: > YES ]; ← pseudo code A couple of points about this line of code, assuming that the method -[NSArray writeToFile:atomically:] is actually being used: 1. This

Re: Can't access by data via KVC during KVO

2017-03-27 Thread Quincey Morris
On Mar 27, 2017, at 14:48 , Daryle Walker wrote: > > The message observation points to the object controller’s “selection”, then a > specific property of my model (of type “String?”). >> Could not cast value of type '_NSStateMarker' (0x7fffa3003cf8) to 'NSString' >> (0x7fffa397df38). >> 2017-0

Re: Is there a way to access other controller square's other icons programmatically?

2017-03-27 Thread Quincey Morris
On Mar 27, 2017, at 12:50 , Daryle Walker wrote: > > So, there is no API to getting at runtime the top-bar items that you add?! > (If you don’t mind a subclass, you can drag items from the storyboard to the > corresponding subclass definition file.) AFAIK, there is no API for this, starting fr

Re: Click-through

2017-03-25 Thread Quincey Morris
On Mar 25, 2017, at 11:18 , Markus Spoettl wrote: > > you can overwrite -mouseDown: and -mouseUp: and not call super. Actually, that’s probably not going to work too well. The easiest way is to subclass the relevant controls and override “acceptsFirstMouse” to return false. However, either app

Re: -[NSWindow makeFirstResponder:] error when NSDrawer is involved

2017-03-24 Thread Quincey Morris
On Mar 24, 2017, at 11:04 , Bill Cheeseman wrote: > > Any suggestions? No good ones, but you keep referring to the “main” window. Is it possible that the drawer window is initially the key window, and this is interfering with setting the first responder? Can you verify that whether main window

Re: Is there a way to access other controller square's other icons programmatically?

2017-03-24 Thread Quincey Morris
On Mar 24, 2017, at 11:11 , Daryle Walker wrote: > > I have a re-explaination, including a picture, at … I think I’m beginning to understand what you’re asking. Part of the problem is that Apple has never properly documented the use of storyboards on macOS, and there seems to be no standard pa

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-22 Thread Quincey Morris
On Mar 22, 2017, at 14:25 , davel...@mac.com wrote: > > On Mar 22, 2017, at 2:00 PM, David Duncan > wrote: >> >> So there was another explanation posted on the bug that I’m not certain you >> got, but which I think may explain. >> >> Basically the concept is that

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-21 Thread Quincey Morris
On Mar 20, 2017, at 14:23 , davel...@mac.com wrote: > > "iOS HFS Normalized UNICODE names , APFS now treats all file[ name]s as a bag > of bytes on iOS . We are requesting that Applications developers call the > correct Normalization routines to make sure the file name contains the > correct re

Re: NSTextFinder guide

2017-03-20 Thread Quincey Morris
On Mar 20, 2017, at 04:49 , Daryle Walker wrote: > > Is it possible for a find-next from the table view’s last location to jump to > the text view’s first location whenever the text view is active? > I’m on the fence whether this is a good user interaction, though This is likely not the answe

Re: Of course I forgot some NSTextFinder questions

2017-03-20 Thread Quincey Morris
On Mar 20, 2017, at 04:58 , Daryle Walker wrote: > >> If all the strings were concatenated together would be the ‘x’ in "fox”. > Is there a off-by-one bug with the end of the second string? Or am I really > misunderstanding Apple’s counting strategy? The second string seems to be > only 9 char

Re: Auto-sized table cells, for macOS

2017-03-18 Thread Quincey Morris
On Mar 17, 2017, at 23:18 , Daryle Walker wrote: > > The table isn’t using the new values, though. There’s no direct relationship linking the intrinsic size to the row height. That’s kinda the point. Nothing is going to happen automatically. You have to detect when the row height might change

Re: Auto-sized table cells, for macOS

2017-03-17 Thread Quincey Morris
On Mar 17, 2017, at 01:45 , Daryle Walker wrote: > > Besides those who intentionally want truncating behavior, wouldn’t “expand to > show all text” be the expected default? The current default isn’t friendly to > end users. I’m a bit puzzled about what you’re expecting. You asked about determi

Re: NSTableView column sizes

2017-03-15 Thread Quincey Morris
On Mar 15, 2017, at 06:51 , Stephane Sudre wrote: > > the Column Sizing option Remember too that each column has its own sizing options that operate in conjunction with the table view’s options. For each column, you can decide whether the column participates in autoresizing (separately from wh

Re: Auto-sized table cells, for macOS

2017-03-14 Thread Quincey Morris
On Mar 14, 2017, at 18:26 , Daryle Walker wrote: > > You’d think that this would be a solved problem…. It sort of is. I think you can find a solution on stackoverflow.com (which is where I got the idea from IIRC) but you have to wade through the out of date stuff to

Re: Library Location

2017-03-13 Thread Quincey Morris
On Mar 13, 2017, at 13:47 , Richard Charles wrote: > > The location for Xcode project-generated files is specified in the Locations > preference. In this preference "Derived Data:" has a Default value which is > ~/Library/Developer/Xcode/DerivedData. Inside this directory is the following > di

Re: More elegance than a long if/else

2017-03-11 Thread Quincey Morris
On Mar 11, 2017, at 06:30 , Pascal Bourguignon wrote: > > My argument is that algebraic expressions are clearer than switches. And it’s a *convincing* argument when you switch to a purely arithmetic problem (such as: how to add two numbers). Seriously, though, I apologize if I let anyone think

Re: More elegance than a long if/else

2017-03-11 Thread Quincey Morris
On Mar 10, 2017, at 17:35 , Pascal Bourguignon wrote: > > this is much clearer in intent than return x+y. So much clearer… My argument is not that the original solution was clearer because longer, but that it was longer because clearer. ___ Cocoa-d

Re: More elegance than a long if/else

2017-03-10 Thread Quincey Morris
On Mar 10, 2017, at 08:24 , Bryan Vines wrote: > > Would integer division work better than the modulus operator? It would certainly work better in the sense that division is the right operator and modulus is the wrong one! Regarding the original question, I would add that there’s a decent argu

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