Xcode 11.2.1, macOS 10.15.1.
Post
Replies
Boosts
Views
Activity
I commented out all the code in the NSTextView subclass so that I was left with only a few segments in the NSDocument subclass that were dealing with the textview, and it turns out that a method containing the line `textView.textStorage.addLayoutManager()` was called twice. Making sure that it is only called once solved the problem. Thanks for your input!
I've been having the same problem for the last week, the message is still there even after restarting Mac and iPad.
Is there a delete button somewhere? In the Actions menu I can only Edit or Move.
I'm not sure that I understand. textViews.enumerated() also starts with index 0.
The textViews array is built in the numberOfPages getter, its length is 2 in this example. The crash doesn't happen if instead of `for _ in 0..<2` I write `for _ in 0..<1`.
Before addPrintformatter 0After addPrintformatter 0Before addPrintformatter 1After addPrintformatter 12020-01-08 10:38:23.070823+0100 problem2[40895:756132] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'...The numberOfPages getter is shown in the original post.
Yes, although I don't mean the content height, only the frame height, so when it is empty the typed text will be at its center.Actually I just noticed that even when setting the textContainerInset to the fixed value of what I know to be half the size of the textview height in UITextView.didMoveToWindow(), the problem still appears.
I don't think so, because the file is moved to the trash and not permanently deleted. Anyway, i tried it and it's still the same.
I see, but those settings can also be found in the Document sidebar.
Sorry, I didn't know that clicking on the checkmark would mark your answer as the correct one (it looks more like a badge to show that your account is verified, so I was wondering where the link would bring me). Is it possible to revert this action?
Anyway, what you suggest is exactly what I'm doing (except that I cannot use withSecurityScope since I'm on iOS), and it's not working.
I'm building an app that makes periodic backups and would like to know what files have changed between two backups (in particular when a file has been renamed so that I can rename it as well on the backup drive instead of removing the old file and copying the new one over again), which as far as I understand is only possible by comparing the inode numbers.
Thank you, I already filed FB8308273.
The problem even when only using stat is that FileManager will already have been its own call to get the other attributes, so it's always approximately double the scan time.
What is the difference between getdirentriesattr and getattrlistbulk? Are there any examples in Swift? I already tried using getattrlistbulk in the past, but could only find examples written in Objective-C which were quite difficult to translate to Swift.
Also, do you know why I'm not getting any email notification when a new answer is posted? I was told in the past that there should be a setting for this, but I cannot find any. I have to keep refreshing this page every now and then to check for new answers.
Thank you so much! Although I don't understand why you use a while loop inside getattrlistbulk2. Shouldn't it be like this:
func getattrlistbulk2(_ dirFD: CInt, _ attrListPtr: UnsafeMutablePointer<attrlist>, _ attrBuf: UnsafeMutableRawBufferPointer, _ options: UInt64) throws -> Int {
let result = getattrlistbulk(dirFD, attrListPtr, attrBuf.baseAddress!, attrBuf.count, 0)
if result >= 0 {
return Int(result)
}
let err = errno
if err != EINTR {
throw NSError(domain: NSPOSIXErrorDomain, code: Int(errno), userInfo: nil)
}
return 0
}