|
From: | David Ayers |
Subject: | Re: [GDL2] EODetailDataSource and EODisplayGroup |
Date: | Fri, 18 Mar 2005 12:49:20 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 |
Dirk Lattermann wrote:
an EODisplayGroup needs an EOEditingContext so that it can observe its objects. The docs say it should get the editing context from its data source in setDataSource:.Now, how is this supposed to work with an EODetailDataSource, whose editingContext: method returns the editing context of the source's master object? Is it safe to assume that a data source will never "switch editing contexts"?
Hello Dirk,I would believe so. The abstract class only declares the -editingContext method and the concrete EODatabaseDatasource is initialized with an editing context and has no manipulation methods.
And even then there's a problem because the detail data source's editing context isn't set until the detail data source is qualified with a master object, which usually means that the master data source has fetched and selected objects. I don't think that's the case normally when setting up the display group, or is it?
If you look at the documentation for EODetailDataSource's -editingContext method:
http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/WebObjects_4.5/System/Library/Frameworks/EOControl.framework/ObjC_classic/Classes/EODetailDataSource.html#//apple_ref/occ/instm/EODetailDataSource/editingContextIt seems pretty clear to me that the master object has to be set for the detail datasource to have access to it's editing context.
There really isn't case of "normally" setting up display groups as with EOF there created in IB. But I the Class docs on the same page explain the principals on how to set up one programmatically.
Hope this helps, otherwise you'll need to explain your problem a bit more in detail.
Cheers, David
[Prev in Thread] | Current Thread | [Next in Thread] |