Re: Font alignment when using bold variant of system font

2016-10-14 Thread Samuel Williams
Just in case anyone finds this thread and wonders what the solution was, here it is: - (void) updateEditorHighlighting: (NSString*)expression { NSTextView * editor = (NSTextView*)[self currentEditor]; [self updateExpressionValue:self.stringValue into:editor.textStorage]; // This fixes a stra

NSTextView tab stop count

2016-10-14 Thread tridiak
Why can’t I use more than 12 tab stops in NSTextView (enclosed by a standard NSScrollView)? I can use less, but I need significantly more. Is it to do with the ruler? NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; NSMutableArray* ma=[NSMutableArray array]; for (int t=0;

Re: NSTextView tab stop count

2016-10-14 Thread Jens Alfke
> On Oct 14, 2016, at 6:43 AM, tridiak wrote: > > How does Xcode & Text Wrangler pull it off? Xcode pretty heavily customizes the Cocoa text engine; even back in the ProjectBuilder days they had a bunch of custom editing subclasses. I wouldn’t be surprised if they implement their own tabbing

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-14 Thread Stephane Sudre
I ended up writing a category for NSManager to deal with this using the xattr.h APIs. Something like: - (NSDictionary *)PKG_extendedAttributesOfItemAtPath:(NSString *)inPath error:(NSError *__autoreleasing *)outError; - (BOOL)PKG_setExtendedAttributes:(NSDictionary *)inExtendedAttributes ofItemAt

Re: NSTextView tab stop count

2016-10-14 Thread Shane Stanley
On 15 Oct. 2016, at 12:43 am, tridiak wrote: > > This works up to 12. Above that, it sticks to 12. Are you sure you're just not seeing them because the text in some columns is longer than you tab width? I just made a simple example with this: NSMutableAttributedString *mas = [[NSMutableA

Re: HandOff Problems

2016-10-14 Thread Gerriet M. Denkmann
> On 13 Oct 2016, at 23:59, Gerriet M. Denkmann wrote: > >> On 13 Oct 2016, at 20:02, Charles Jenkins wrote: >> >> I don’t have any answers, but please keep us posted. Sierra is the first >> macOS upgrade that proved to be a complete disappointment to me, because the >> interesting new featu

observeValueForKeyPath:... called too often in macOS 12

2016-10-14 Thread Gerriet M. Denkmann
My app (macOS 12) observes a value in NSUserDefaults. Starting with macOS 12 observeValueForKeyPath:… is called at the start of the program, although nothing has changed yet. When the value actually changes, it is called twice. Also: NSKeyValueObservingOptionNew or NSKeyValueObservingOptionOld j