esp1/Task-List — Issue #1: normalize edit of ist, detail
Author: esp1
Created: 2011-12-01 17:15:00+00:00
State: open

hey... both detail and list use DetailViewControllerDelegate..
altho detail holds an instance of a delegate, where List is a detail delegate.. so yah, not the same.
actually i might need both to implement both sides, depending on how things are wired..

how am i setting the object context for list -> cell -> detail transition?
cell.entity is set via list.configureCell:forManagedObject:
list.prepareForSegue does this!
- segue.destinationViewController is assumed to be a DetailViewController
- set detailViewController.delegate = self
- set entity = objectAtIndexPath selected row

i need to do the same for arbitrary (e.g. button) -> push transition

interface for DetailViewController

hmm also, the life cycle methods in CoreDataTableViewCell and DetailViewController are the same:
EntityViewer:
the thing that holds an entity instance and widgets to view/modify properties of that entity
@property (nonatomic, strong) id entity;
@property (nonatomic, strong) DataBindingContext *dataBindingContext;
- (void)initializeStates;
- (void)configureDependencies;
- (void)setWidgetStateFrom:(id)source;
- (void)setEntityState;
should probably pull out into a common interface. what to call it?

what to call this?
umm.. this is the thing that holds a reference to the edit handler..
@property (nonatomic, weak) id entityEditHandler;

this is optional if you have a viewer that doesn't actually hold its edit handler, as in the case of a table cell. very odd though.
not all entity viewers are umms. case in point: the table cell is an entity viewer, but it is the cell's containing list that is the holder of the edit handler, weirdly enough.
entityEditHandler is set when you're transtioning into a detail entity viewer. yah. only then.
so if i'm a top-level viewer, this won't be set.

----

ok, so now my concern is, when i switch into another view, i may want the opportunity to set its context relative to mine
how to model this? e.g. *transition(view, context expression)*

this already happens now with list -> item -> detail, but that case is a given