Thanks a lot.
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 11:08.
yes it can run concurrently
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 11:08.
first of all why do you want to have 2 threads, u can easily do with 2 active objects in the same thread. This will make your life simpler !!!
However, if you still want to have 2 threads, then you might have to use some thread communication mechanism.
It could be through client-server, or message passing, or shared heap, or simply active objects synchronized way, where in the heap is shared and hence by basic active objects you can pass messages.
Amit Kankani
Nokia Developer Champion
As heaven maintains vigor through movements, a gentle man should constantly strive for self-perfection.
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 11:08.
No, it can not. There are not any extra threads in your code until you explicitly start using RThread.
Active objects are basically callbacks invoked by the Active Scheduler running in your "main thread". This inherently means that there is no 'concurrency' between active objects, one runs after the other. That is why RunL methods have to return fast, and it also applies to methods from M-classes and TCallBack.
I am little confused, are you creating a separate thread yourself in the code, something like
well if not then it is a single thread you are working on.RThread thread;
thread.Create(....);
thread.Resume(...);
In case of single thread, you can do this, once the active object has read the data, then you can call DrawNow or DrawDeferred of the particular container being shown.
Amit Kankani
Nokia Developer Champion
i.e. in the RunL of the active object, you can call draw of the current container, or change view, etc, depending on your application logic. !
Amit Kankani
Nokia Developer Champion
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 11:08.
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 11:08.
Why do not you use [CODE ] and [/CODE ] tags (without the spaces)? It preserves your formatting for example.
Anyway, note that OnContentL may be invoked multiple times, and in that cases you simply overwrite old content. This kind of code can be debugged in the emulator, so you can try that.
Yes rightly said, you should use [CODE ] tags when posting code so that we can read it easily.
Also OnContentL , you should be appending to old values and not simply assigning.
Also AppendItemsL is called when. Make sure you call it once the parsing is DONE...
Use breakpoints to check the same.
Amit Kankani
Nokia Developer Champion