09-05-2013 11:34 PM - edited 09-05-2013 11:48 PM
I know the model stuff and have done it on other sections of my code,
BUT I always wonder this as it is less cumbersome to setup. I receive data and can create a XML file and would like to use it as the source to a listView at runtime , but the data doesn't seem to update with the one just created and the Listview loads with the static xml. I'm overwriting the xml to the assets folder .. is that allowed??? I'm thinkimg may be I should use the documents folder instead???? but that one also is not working for me. Any hints?????
Edit: Playing around it go it to work using this path /accounts/1000/shared/documents/myFile.xml not sure if it is the proper way , the Absolute path din't like me... but since the GUI stuff is in a QML it seems lime it loads the previous copy, how to push it to reload the xml????
09-06-2013 04:42 AM
I'm struggling to understand your problem but part of it I think I understood.
You won't be able to write to the assets folder, if you move your xml file to a shared folder then that is fine as long as you don't mind it being accessible to all.
If you'd rather keep it private then copy or write it to the data folder.
The 'reload' part needs some further explanation?
09-06-2013 07:25 AM
Thanks ... the reloading issue seems to be due to the way my QML is setup which seems to preload stuff , I have a tab based with a bunch of sheets/dialogs.
I did manage to write to assets but same issue, it loads the previous value not the one generated on the fly. Have quite a few sections where this would make life easier and quicker than setting a model and blah blah balh ...I'm experimenting with Datasource.load() / clear() to see if this can somehow cover this.
09-06-2013 08:42 AM
09-06-2013 01:06 PM
It also does it with a xml in documents ... even tried a CreateObject to recreate the section on the fly still does not pick up the current xml so it is looking like a lost case .... it is a real pain to have to create itemProvider and a bunch of other annoying things just to repopulate a simple ListView ... there is always a way I' m pretty sure but the documentation doesn't cover my setup as the dataSource.load() technique doesn't seem to work in a Dialog all samples are in Page ... of course .. so back to shooting darts in the dark until it hits ... kind of a pain.