NSTableview reloadDataForRowIndexes sounds on Mac

I am developing a Mac application, I am getting a strange problem. When ever I reload a row and for a particular column when I execute the reload code, I get the sound output from my mac.

Below is the code

myTableView.reloadDataForRowIndexes(myTableView.selectedRowIndexes, columnIndexes: NSIndexSet.init(index: myTableView.columnWithIdentifier("source"))) 

I have a column with the identifier "source" when I try to reload, and after executing the above line, I get the sound in my mac.

I am using Xcode 7.3, OSX 10.11.6

+5
source share
2 answers

Finally, I found the problem. I debugged the code in depth and found the root cause.

The sound comes when I call under the code, here sourceTextField is NSTextField. I commented on this code and everything is working fine. (I can directly pass the value to the text box, for example sourceTextField.stringValue.)

 sourceTextField.insertText(itemText) 

Thanks to everyone who took some time to write a comment / post, Sorry to trouble you all.

0
source

Have you tried setting a breakpoint on NSBeep ()? My thoughts are that the table or some other code that triggers the update sends an error message.

0
source

All Articles