I had the suggestion to use function textDidChange() to perform code inside this function automatically. It is working. It is in my Controller class.
Now I am going to use this approach for creating automatically, inside of textDidChange(), a dictionary variable from text, when user is typing in NSTextView. Then, I need this dictionary for the NSTableView functions, to display a Table in application corresponding to the text typed by user. Question is how to make accessible this dictionary from textDidChange(_:) function for the NSTableView functions like
numberOfRowsInTableView(tableView: NSTableView)
and
tableView(tableView: NSTableView, viewForTableColumn tableColumn: NSTableColumn?, row: Int) -> NSView?
All in the same Controller class.