Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > EOInterface Reference

Table of Contents

EODisplayGroup Delegate


(informal protocol)
Declared in:
EOInterface/EODisplayGroup.h



Protocol Description


The EODisplayGroup Delegate informal protocol defines methods that an EODisplayGroup can invoke in its delegate. Delegates are not required to provide implementations for all of the methods in the informal protocol. Instead, declare and implement any subset of the methods declared in the informal protocol that you need, and use the EODisplayGroup method setDelegate: method to assign your object as the delegate. A display group can determine if the delegate doesn't implement a delegate method and only attempts to invoke the methods the delegate actually implements.



Method Types


Fetching objects
- displayGroupShouldFetch:
- displayGroup:didFetchObjects:
- displayGroup:shouldRefetchForInvalidatedAllObjectsNotification:
Inserting, updating, and deleting objects
- displayGroup:shouldInsertObject:atIndex:
- displayGroup:didInsertObject:
- displayGroup:createObjectFailedForDataSource:
- displayGroup:didSetValue:forObject:key:
- displayGroup:shouldDeleteObject:
- displayGroup:didDeleteObject:
Managing the display
- displayGroup:shouldDisplayAlertWithTitle:message:
- displayGroup:shouldRedisplayForChangesInEditingContext:
- displayGroup:displayArrayForObjects:
Managing the selection
- displayGroup:shouldChangeSelectionToIndexes:
- displayGroupDidChangeSelection:
- displayGroupDidChangeSelectedObjects:
Changing the data source
- displayGroupDidChangeDataSource:


Instance Methods



displayGroup:createObjectFailedForDataSource:

- (void)displayGroup:(EODisplayGroup *)aDisplayGroup createObjectFailedForDataSource:(EODataSource *)aDataSource

Invoked from insertObjectAtIndex: to inform the delegate that aDisplayGroup has failed to create a new object for aDataSource. If the delegate doesn't implement this method, the EODisplayGroup instead runs an alert panel to inform the user of the failure.

displayGroupDidChangeDataSource:

- (void)displayGroupDidChangeDataSource:(EODisplayGroup *)aDisplayGroup

Informs the delegate that aDisplayGroup's EODataSource has changed.

displayGroupDidChangeSelectedObjects:

- (void)displayGroupDidChangeSelectedObjects:(EODisplayGroup *)aDisplayGroup

Informs the delegate that aDisplayGroup's set of selected objects has changed, regardless of whether the selection indexes have changed.

displayGroupDidChangeSelection:

- (void)displayGroupDidChangeSelection:(EODisplayGroup *)aDisplayGroup

Informs the delegate that aDisplayGroup's selection has changed.

displayGroup:didDeleteObject:

- (void)displayGroup:(EODisplayGroup *)aDisplayGroup didDeleteObject:(id)anObject

Informs the delegate that aDisplayGroup has deleted anObject.

displayGroup:didFetchObjects:

- (void)displayGroup:(EODisplayGroup *)aDisplayGroup didFetchObjects:(NSArray *)objects

Informs the delegate that aDisplayGroup has fetched objects.

displayGroup:didInsertObject:

- (void)displayGroup:(EODisplayGroup *)aDisplayGroup didInsertObject:(id)anObject

Informs the delegate that aDisplayGroup has inserted anObject.

displayGroup:didSetValue:forObject:key:

- (void)displayGroup:(EODisplayGroup *)aDisplayGroup didSetValue:(id)value forObject:(id)anObject key:(NSString *)key

Informs the delegate that aDisplayGroup has altered a property value of anObject. key identifies the property, and value is its new value.

displayGroup:displayArrayForObjects:

- (NSArray *)displayGroup:(EODisplayGroup *)aDisplayGroup displayArrayForObjects:(NSArray *)objects

Invoked from updateDisplayedObjects, this method allows the delegate to filter and sort aDisplayGroup's array of objects to limit which ones get displayed. objects contains all of aDisplayGroup's objects. The delegate should filter any objects that shouldn't be shown and sort the remainder, returning a new array containing this group of objects. You can use the NSArray methods filteredArrayUsingQualifier: and sortedArrayUsingKeyOrderArray: added in EOControl to create the new array.

If the delegate doesn't implement this method, the EODisplayGroup uses its own qualifier and sort ordering to update its displayed objects array.

See Also: - sortOrderings, - qualifier, - displayedObjects



displayGroup:shouldChangeSelectionToIndexes:

- (BOOL)displayGroup:(EODisplayGroup *)aDisplayGroup shouldChangeSelectionToIndexes:(NSArray *)newIndexes

Allows the delegate to prevent a change in selection by aDisplayGroup. newIndexes is the proposed new selection, an array of NSNumbers. If the delegate returns YES, the selection changes; if the delegate returns NO, the selection remains as it is.

displayGroup:shouldDeleteObject:

- (BOOL)displayGroup:(EODisplayGroup *)aDisplayGroup shouldDeleteObject:(id)anObject

Allows the delegate to prevent aDisplayGroup from deleting anObject. If the delegate returns YES, anObject is deleted; if the delegate returns NO, the deletion is abandoned.

displayGroup:shouldDisplayAlertWithTitle:message:

- (BOOL)displayGroup:(EODisplayGroup *)aDisplayGroup shouldDisplayAlertWithTitle:(NSString *)title message:(NSString *)message

Allows the delegate to prevent aDisplayGroup from displaying an attention panel with title and message. The delegate can return YES to allow aDisplayGroup to display the panel, or NO to prevent it from doing so (perhaps displaying a different attention panel).

displayGroupShouldFetch:

- (BOOL)displayGroupShouldFetch:(EODisplayGroup *)aDisplayGroup

Allows the delegate to prevent aDisplayGroup from fetching. If the delegate returns YES, aDisplayGroup performs the fetch; if the delegate returns NO, aDisplayGroup abandons the fetch.

displayGroup:shouldInsertObject:atIndex:

- (BOOL)displayGroup:(EODisplayGroup *)aDisplayGroup shouldInsertObject:(id)anObject atIndex:(unsigned int)anIndex

Allows the delegate to prevent aDisplayGroup from inserting anObject at anIndex. If the delegate returns YES, anObject is inserted; if the delegate returns NO, the insertion is abandoned.

displayGroup:shouldRedisplayForChangesInEditingContext:

- (BOOL)displayGroup:(EODisplayGroup *)aDisplayGroup shouldRedisplayForEditingContextChangeNotification:(NSNotification *)aNotification

Invoked whenever aDisplayGroup receives an EOObjectsChangedInEditingContextNotification, this method allows the delegate to suppress redisplay based on the nature of the change that has occurred. If the delegate returns YES, aDisplayGroup redisplays; if it returns NO, aDisplayGroup doesn't. aNotification supplies the EOEditingContext that has changed, as well as which objects have changed and how. See the EOEditingContext class specification for information on EOObjectsChangedInEditingContextNotification.

See Also: - redisplay



displayGroup:shouldRefetchForInvalidatedAllObjectsNotification:

- (BOOL)displayGroup:(EODisplayGroup *)aDisplayGroup shouldRefetchForInvalidatedAllObjectsNotification:(NSNotification *)aNotification

Invoked whenever aDisplayGroup receives an EOInvalidatedAllObjectsInStoreNotification, this method allows the delegate to suppress refetching of the invalidated objects. If the delegate returns YES, aDisplayGroup immediately refetches its objects. If the delegate returns NO, aDisplayGroup doesn't immediately fetch, instead delaying until absolutely necessary. aNotification is an NSNotification. See the EOObjectStore and EOEditingContext class specifications for information on this notification.


Table of Contents