Question's about state manager

ggpanta

Member
Licensed User
Longtime User
Hi, I have an issue with the state manager.

In my app I have a different layout for each function.

On Pause I save the layout title
as well as use the state manager to save the state

On Resume I reload the layout
And restore the state.
My problems are :

* The only thing that is stored is Edit boxes, Do I have to create views (buttons, listboxes, tabs etc) in code in order for the statemanager to save them?

* Is there someway I can get the current layout filename ? I am now doing a case for the layout titles.
 

ggpanta

Member
Licensed User
Longtime User
I think I found the issue for the satemanager. I think its because statemanager doesnt save the items at all due to nesting depth.
Activity
\ Panel
\ Other Views
In some cases as in tab hosts its
Activity
\ Panel
\ TabHost
\ Other Views

Is this a something that will be altered later in SM?

Also I still cant find a way to get the activity file name some how, any idesa?
 
Upvote 0

ggpanta

Member
Licensed User
Longtime User
The issue with your modified version is that it waits for a tabhost list in every activity.
I only have 1 activity(layout) that uses tabhost's, the solution would be to rename the sub's and have a different one for layouts that have a tabhost.

In order to make this a more full solution though, is it possible to request from an object to provide all objects that it is a parent of? Ie I could start with the activity and then for each object returned I would query its own children until no objects are parents of an object.

Also about the activity file name, using a variable (I actually use the activity title and map to file names) is my solution now, but wouldnt this be easy to implement on the b4a side? and it would make it easier. To my understanding whenever I load a layout, all other layouts are destroyed so it wouldnt be difficult to have a readonly property for the activity that holds the filename.

Regards
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…