ksignorini
Registered
Please help if you can. I don't have much hair left.
I have a project with a document called iDMDocument, a window controller called iDMController and on my main document window I have a tableview that uses an NSObject called CombatTableDataSource as its data source.
The trouble is that in order to archive the document's data, I first need to sync up the data in the data source (a single array of other objects) with an identical array in my document object. At that point I can use the archiving methods to save the data to a file.
The problem is that I have no idea how to get my iDMDocument to talk to the CombatTableDataSource object. I simply need it to pass the array from the data source to the document.
Can anyone help? I'm desperate.
(As a side note, it was no problem to get the window controller object to pass its data by using [[self windowControllers] makeObjectsPerformSelectorselector(prepareForSave)] to call a prepareForSave method in the window controller which then calls a method in [self document] to set the data in a variable in a document.) - this was courtesy of Building Cocoa Applications A Step-by-Step Guide by O'Reilly.
Thanks,
Kent!
I have a project with a document called iDMDocument, a window controller called iDMController and on my main document window I have a tableview that uses an NSObject called CombatTableDataSource as its data source.
The trouble is that in order to archive the document's data, I first need to sync up the data in the data source (a single array of other objects) with an identical array in my document object. At that point I can use the archiving methods to save the data to a file.
The problem is that I have no idea how to get my iDMDocument to talk to the CombatTableDataSource object. I simply need it to pass the array from the data source to the document.
Can anyone help? I'm desperate.
(As a side note, it was no problem to get the window controller object to pass its data by using [[self windowControllers] makeObjectsPerformSelectorselector(prepareForSave)] to call a prepareForSave method in the window controller which then calls a method in [self document] to set the data in a variable in a document.) - this was courtesy of Building Cocoa Applications A Step-by-Step Guide by O'Reilly.
Thanks,
Kent!