CVertex
unread,Jul 27, 2009, 5:18:59 AM7/27/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Three20
Howdy,
My models derive from TTModel with alot of the automatic stuff it
offers.
I notify my model listeners that loading has started like so
- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more {
[_delegates perform:@selector(modelDidStartLoad:) withObject:self];
// start http request for stuff
}
Since TTModel uses the cache for it's stuff, the cache key eventually
becomes outdated and model.IsOutdated returns false. This actually
happens inside the TTModelViewController listener of
modelDidStartLoad:. So, when modelDidStartLoad is called from load:,
TTModelViewController does some stuff to update it's state, then
called reloadIfNeeded and calls load again, resulting in an infinite
loop.
I removed the delegate notification from load:cachePolicy:more:, but
then there's no obvious hook to tell the controller the model is
loading.
Does anyone know how to get around this issue?
Or during the update to TTModel, was something changed that I didn't
change appropriately in my code.
Any help is greatly appreciated,
-CV