Posts

Post not yet marked as solved
9 Replies
2.5k Views
Hello,I'm coming across some bizarre behaviour in a view-based NSTableView and I can't work out what's causing it: single-clicking to select a row causes the row to start editing after a second. This happens only in two of my table views (one using Auto-Layout, the other not, so that's not a factor); I'm not seeing this behaviour in any of my other view-based table views that allow editing, even with apparently the same settings.I'm aware that standard behaviour is that if you select a row, and then click on it again, it will start editing. But also, I thought that setting up a doubleAction on a table view prevented this behaviour. And yet, one of my table views with this behaviour has a double action on it (to start editing on double-click). Moreover, editing isn't starting on a row that you click on which is already selected; editing is beginning when you simply click on an un-selected row to select it. After a slight delay, it begins editing.I tried subclassing NSTextField and setting a breakpoint -becomeFirstResponder to see what was triggering the edit. This wasn't very informative - it just tells me that private Apple methods are starting the edit after a delay:[NSTableRowData _delayMakeFirstResponder]I've been comparing the table against others that don't have the problem, and I can't find any differences: I'm calling the same methods in code, and setting them up the same in IB. I even went through line-by-line in the .xib file comparing two tables, but the XML was much the same for both, and experimenting to make them exactly the same did not help. I also deleted the table view in IB and rebuilt it - it has the same problem.The behaviour is hugely annoying - has anybody else experienced this, and does anyone know how to fix it? (I'm aware that I haven't provided an awful lot to go on, but there is nothing special about these tables compared to other tables that work as expected; they are both populated an NSArrayController, but all options for the tables and array controlles are the same as other tables.)Many thanks,Keith
Posted
by KeithB.
Last updated
.
Post not yet marked as solved
1 Replies
820 Views
Hello,I'm trying to update my old AddressBook-based code with the Contacts framework. However, the Contacts framework seems far less reliable. In particular, I am trying to get the user's "My Card" information. In AddressBook, this is straightforward. I just need to do this:ABPerson *person = [[ABAddressBook sharedAddressBook] me];The equivalent for the Contacts framework would seem to be:CNContactStore *contactStore = [[CNContactStore alloc] init]; CNContact *contact = [contactStore unifiedMeContactWithKeysToFetch:@[CNContactGivenNameKey, CNContactFamilyNameKey, CNContactPostalAddressesKey, CNContactEmailAddressesKey, CNContactPhoneNumbersKey] error:&error];However, this method returns nil if the user's "My Card" in Contacts is in the "iCloud" list rather than in the "All on My Mac" list (and returns an error of "Error Domain=CNErrorDomain Code=200 "Updated Record Does Not Exist" UserInfo={NSLocalizedDescription=Updated Record Does Not Exist, NSLocalizedFailureReason=The save request failed because it updates a record that does not exist or has already been deleted.}").If I create a card in the "All on My Mac" section and set it to "My Card" using Card > Make This My Card" in Contacts app, -unifiedMeContactWithKeysToFetch: works. But if "My Card" is only listed in the "All Contacts" and "All iCloud" sections and not in "All on My Mac", then it fails and returns nil.By contrast, [[ABAddressBook sharedAddressBook] me] works regardless of where "My Card" is stored. This means that, for now, I have to keep on using the older AddressBook framework and cannot upgrade to the Contacts framework as it doesn't seem to give me the information I need. Am I missing some way of getting the "My Card" no matter where it is in Contacts, or is this a bug in the current Contacts framework?Thanks!
Posted
by KeithB.
Last updated
.
Post not yet marked as solved
6 Replies
2.7k Views
NSProgressIndicator's -usesThreadedAnimation feature is completely broken on High Sierra. I use this in a few areas for indeterminate progress indicators, for instance inside a template icon when the user has chosen to create a project from a template and the template is being extracted to disk. On High Sierra, the progress indicator appears but does not spin, sitting there still during the blocking process.I've reported this as a bug, #32929906, which has been closed as a duplicate of #10463742. The bug has been there since beta 1 and is still present in beta 4. When I updated my bug report to say that it was still present, Apple engineering replied, "it has not been determined how or when the issue will be resolved". Hopefully this is just a polite way of saying, "Yeah, we know, stop hassling us", but in case this isn't fixed for the release, does anybody know of a workaround? This seems like quite a major bug, but I can't find anyone else mentioning it anywhere. Is there a trick to getting an indeterminate NSProgressIndicator working using threaded animation on High Sierra that I've missed?
Posted
by KeithB.
Last updated
.