언어 설정

Menu
Sites
Language
SceneManager

Hi,
I'm create form for showing documents in my application. In documents I have links for navigation between different documents.

And when i try go to this link(I need go from first document to next)


SceneManager* pSceneManager = SceneManager::GetInstance();

ForwardSceneTransition  transction( IDSCN_DOCUMENT_VIEW_FORM,
                                        SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
                                        SCENE_HISTORY_OPTION_ADD_HISTORY,
                                        SCENE_DESTROY_OPTION_KEEP);

pSceneManager->GoForward(transction, list);

I get next exeption.

 [E_INVALID_ARG] Invalid argument is used. Can't forward to current Scene.

Why? 

Responses

8 댓글
Slawek Kowalski

Probably the problem is your sceneID. Make sure it is used in your Form and you put correct name.

You can use just:

ForwardSceneTransition  transction( IDSCN_DOCUMENT_VIEW_FORM,
                                        SCENE_TRANSITION_ANIMATION_TYPE_LEFT);

 

 

Alex Dem

Hi,
I have checked. This approach should works.
Possibly you use wrong SceneId (like supposed above) or unclear what incoming param 'list' contains. Also E_INVALID_ARG comes if you try to perfrom transition to the same scene where you are.
Alexey.

Serikov

Yes, i try to perform  transition to the same scene. I have scene for showing documents. Then i go by link  from 1 document to other but scene is one.

Slawek Kowalski

I suppose you can't navigate between same scene. I doesn't work like web browser.

Use two scenes instead and change Form content after getting scene callback.

 

Serikov

Do you think this is a best way to show for example nested list i need have 2 forms?

Serikov

If I will be used 2 form. How can i restore previous form state after back action? (If in the formstack > 4 forms)

Alex Dem

Hi,
param SCENE_DESTROY_OPTION_KEEP param should save state(for example) :
1)For transition Form1->Form2
        ForwardSceneTransition  transition( Scene2,
                                                SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
                                                SCENE_HISTORY_OPTION_ADD_HISTORY,
                                                SCENE_DESTROY_OPTION_KEEP);//the scene will not be destroyed and will be added to the history
 r=pSceneManager->GoForward(transition);
2)For transition Form2->Form1 (back key)

    BackwardSceneTransition  transition(Scene1,
        SCENE_TRANSITION_ANIMATION_TYPE_RIGHT,
        SCENE_DESTROY_OPTION_KEEP);
       pSceneManager->GoBackward(transition);

Just look at this also:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.appprogramming/html/guide/ui/scene_transitions.htm#general

Alexey.

Slawek Kowalski

So far I didn't use nested list for Tizen.  You can check here:

https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/classTizen_1_1Ui_1_1Controls_1_1ListView.html

 

With scene activation you get callback: OnSceneActivatedN(). Here you can change Form content - use parameters from IList

passed by that callback. This approach works fine and is strongly recommended.

 

Instead use 2 Forms to swap them from time to time you can add a few Panels and fill them in with content you want to show.

This make sense only if you got a few documents to show.

 

regards