阅读633 返回首页    go 人物


Requesting help scrolling to end of Sierra scro...

G’day folks.

 

I thought I’d finished my App, but the latest Sierra has broken my Scroll Field scrolling.

 

The present script takes 1 minute to trim excessive paragraphs, and a whopping 10 minutes or more to simly scroll to the end.

 

Used to be lightning fast.

 

I’ve found this recommended method to now use, but canot work out how to re-write it for ASObC.

 

 

- (void)textDidEndEditing:(NSNotification *)notification {
    NSTextView *text = [notification object];
    unsigned whyEnd = [[[notification userInfo] objectForKey:@"NSTextMovement"] unsignedIntValue];
    NSTextView *newKeyView = text;
 
    // Unscroll the previous text.
    [text scrollRangeToVisible:NSMakeRange(0, 0)];
 
    if (whyEnd == NSTabTextMovement) {
        newKeyView = (NSTextView *)[text nextKeyView];
    } else if (whyEnd == NSBacktabTextMovement) {
        newKeyView = (NSTextView *)[text previousKeyView];
    }
 
    // Set the new key view and select its whole contents.
    [[text window] makeFirstResponder:newKeyView];
    [newKeyView setSelectedRange:NSMakeRange(0, [[newKeyView textStorage] length])];
}

 



最后更新:2017-10-07 04:55:01

  上一篇:go iCloud videos help
  下一篇:go cannot send  aol mail with apple mail