Languages

Menu
Sites
Language
How to implemente (or use) the IList Interface

Hello.

Well, I'm a beginner in the Tizen Native Development and I want to know about the IList Interface and how can I implement or use it.

Could You help me with that litle trouble.

 

Responses

6 Replies
Alex Dem

Hi,
The implementations of IList are: LinkedList and ArrayList.
If you want to use your own list you could use theirs.
Here is IList class members ( but there is no Construct method even ):
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/classTizen_1_1Base_1_1Collection_1_1IList.html
Alexey.

Alex Ashirov

Hi,

You can’t use the IList directly because it’s abstract interface with pure virtual methods. As mentioned above you need to use its successors (ArrayList and LinkedList). But if you want to implement your own class inherited from the IList then you must define all the pure virtual methods of the IList.

Alex Dem

Hi,
Maybe you could manage your collection (ArrayList etc) via base class pointer , for example :

    IList * pList;
    ArrayList List1;

    List1.Construct(2);
    pList= &List1;

    pList->Add(new Integer (10));   // 1
    pList->Add(new Integer (20));   // 1,2

    int firstItemValue= static_cast< Integer* > (pList->GetAt(0))->ToInt();

 

It is not necessary, but I did not find another usage for IList.
Alexey.

Patrick Lima

Thanks for the explanations.

I was in doubt because I want to pass data between forms, but I couldn't do it.

I'm testing the resources with a simple form-based application with scene manager. I'm using the the ArrayList class and tried to take the data in OnSceneActivated event handler, but it doesn't working. 

Someone could give me a help with this: to pass data between forms and How could I acess them.

Alex Ashirov

Hi,

In general, you need to use scene manager ‘s methods like  Tizen::Ui::Scenes::SceneManager::GoForward(), Tizen::Ui::Scenes::SceneManager::GoBackward() to pass parameters. Then you need to receive the parameters in the OnSceneActivatedN(). Please take a look at \tizen-sdk\platforms\tizen2.2\samples\native\cpp\Sample\Tizen Native\SceneManagement\ sample for detailed code samples.

Alex Dem

Hi,

just fyi:

https://developer.tizen.org/forums/native-application-development/pass-values-between-scenes

Alexey.