I'm coming back to development after a few years away
Been working through Hillegass as a refresher.
Is my recollection of good programming practice wrong, or does Hillegass break MVC?
In Chapter 9, Page 149 there's example code added to the Raiseman application that starts auto-editing of newly added employees.
The code wires the MyDocument (of NSDocument) to an NSTableView. Why would you ever do that? Why should the model ever 'know about' a user interface object?
Isn't the right thing to do at that point to implement a custom employee/tableview controller that takes care of that behaviour, leaving the document class to focus on being an employee model?
Interested in people's views - like I said, I've been away for a while so happy to learn something here.
Regards,
LWR
Been working through Hillegass as a refresher.
Is my recollection of good programming practice wrong, or does Hillegass break MVC?
In Chapter 9, Page 149 there's example code added to the Raiseman application that starts auto-editing of newly added employees.
The code wires the MyDocument (of NSDocument) to an NSTableView. Why would you ever do that? Why should the model ever 'know about' a user interface object?
Isn't the right thing to do at that point to implement a custom employee/tableview controller that takes care of that behaviour, leaving the document class to focus on being an employee model?
Interested in people's views - like I said, I've been away for a while so happy to learn something here.
Regards,
LWR