Open GoogleCodeExporter opened 8 years ago
Original comment by Lars.Grammel
on 22 Dec 2010 at 11:45
It looks OK, but I have some questions about the asynchronous callback. First,
how would it work? How does the framework know to request the loading of
resources? Does it make a call to the load manager with a callback? Also, what
happens when not all of the resources can be loaded (server error, or missing
resource?). Do we just forget about the missing resources, or do we try again?
Original comment by delmyers...@gmail.com
on 22 Dec 2010 at 6:41
I was thinking that we would always pass an asynchronous callback into Resource
whenever we try to access URIList properties (or maybe even any property), but
this might make programming really awkward and complicated. I am not sure what
the best solution to this is, as calling the server transparently requires
asynchronous callbacks. Events might be an alternative, but this ends up with
the same awkward indirection. We could also supply two variants for accessing
resources, one with an async callback that loads resources/properties on demand
if required, and another variant that is a regular method call which returns
null if the property has not been loaded yet.
The framework would know to request the resources based on a mapping of
resource type and property to a specific loader that we would need to set up.
We could keep track of loaded resource properties using flags in resources.
The callback would also be notified whenever the resources could not be loaded
(onFailure). That way, we could react to loading failures and missing resources
in customizable ways.
Original comment by Lars.Grammel
on 23 Dec 2010 at 12:38
Original issue reported on code.google.com by
Lars.Grammel
on 22 Dec 2010 at 11:45