Obsolete
Status Update
Comments
gl...@gmail.com <gl...@gmail.com> #2
Important addition!!!!!
The App just stopped working again and is giving me the NeedIndexError again! This
coincided with my re-addition of the superset (ancestor only) index going from status
"building" to "serving".
So, I think it might be clear what is going on:
With an index setup like this:
indexes:
- kind: Segment
ancestor: yes
- kind: Segment
ancestor: yes
properties:
- name: rev
The second index seems to be hidden by the first one, since it is a subset of the
first. Deleting the first index exposes the second one.
After deleting the first index out of index.yaml and running "appcfg.py update", a
call to "appcfg.py vacuum_indexes" outputs this:
Fetching index definitions diff.
This index is no longer defined in your index.yaml file.
ancestor: true
kind: Segment
properties: []
Are you sure you want to delete this index? (N/y/a): y
Deleting selected index definitions.
Error 500: --- begin server output ---
Server Error (500)
A server error has occured.
--- end server output ---
After this, the app works again, despite the error.
This problem only seems to be happening if an ancestor is involved.
I hope this helps.
Thanks,
Markus
The App just stopped working again and is giving me the NeedIndexError again! This
coincided with my re-addition of the superset (ancestor only) index going from status
"building" to "serving".
So, I think it might be clear what is going on:
With an index setup like this:
indexes:
- kind: Segment
ancestor: yes
- kind: Segment
ancestor: yes
properties:
- name: rev
The second index seems to be hidden by the first one, since it is a subset of the
first. Deleting the first index exposes the second one.
After deleting the first index out of index.yaml and running "appcfg.py update", a
call to "appcfg.py vacuum_indexes" outputs this:
Fetching index definitions diff.
This index is no longer defined in your index.yaml file.
ancestor: true
kind: Segment
properties: []
Are you sure you want to delete this index? (N/y/a): y
Deleting selected index definitions.
Error 500: --- begin server output ---
Server Error (500)
A server error has occured.
--- end server output ---
After this, the app works again, despite the error.
This problem only seems to be happening if an ancestor is involved.
I hope this helps.
Thanks,
Markus
Description
As background, Fragments are apparently sometimes instantiated by the Android OS and thus [need a public no-arg constructor][1]:
But the [NewsReader demo][2] from the official Android training on Fragments constructs the `HeadlinesFragment` class and configures it with `setOnHeadlineSelectedListener(this)` from `NewsReaderActivity.onCreate()`.
If the Android OS re-instantiates this fragment, the `mHeadlineSelectedListener` field will be null because `HeadlinesFragment` doesn't save or restore its state.
Is this a bug or am I missing something?
[1]:
[2]: