I am new to macOS app writing so I'm doing something with storyboard. I took an existing app source demo I found on the web and I'm modding it. I've learned quite a bit from playing with it but I haven't found all I need. Much of the online help is for iOS apps and doesn't entirely transfer over. Others are old and obsolete.
Here's what I have so far.
I have a windowcontroller with a child viewcontroller which contains a tableview and a customised class derived from an image view. I am using this so I can customise drag and drop.
The table view in the sample has a delegate which reads from an array to populate the table. I can add, subtract, etc. text items from the array, call the tableview's reloadData() method and it populates the table. That bit works great.
What I want do to is when I drag an image onto my custom image view class is that it takes the filename of the image and adds it to the table view of the parent.
One way I suppose I could do it is with shared data but that's rather messy. A cleaner way would be for the child custom imageview to send an event to the parent and the parent handling the event. Only I do not know how to do this. I saw something using protocols but that was for iOS and wouldn't transfer properly.
I'm using macOS Montery and Xcode 14.2.
I found something on protocols which i copied, pasted and changed class names. However, some properties/methods were missing. Most online code of this nature seems to be written for iOS.