- This topic has 8 replies, 2 voices, and was last updated 11 years, 10 months ago by donij.
-
AuthorPosts
-
donijMemberHi All,
My mb1 version is 2.2 and I have a challenge organizing my screen (.mobi) files under one project.
(1) How do I make sure that all my screen files are within a given project as per best practice for mb1 project.
When I run each screen a -www folder is created and each has its own script file. (2) Is it normal to have each screen file with its own script file and (3) how do I pass data from one screen to the other.
Thank for your help.
support-octavioMemberHi,
Your screens are going to be included in the main app if there is a widget that links to them. i.e. you have your index.mobi with a widget that links to contact.mobi and map.mobi, with that links your contact and map screens will be included in app. Also, if you don’t link a screen using a widget, you can add it as an additional project file:
You can test your screens one by one and you’ll get many <screen>_www folder, but the only folder that we suggest you to keep is the <mainApp>_www folder, where you should put your code in <mainApp>_custom.js file.
donijMemberHi,
thanks for the response. I just want to understand what you mean by “Your screens are going to be included in the main app if there is a widget that links to them” . Does it mean, for example, if I have two screens A & B and there is a button in screen A, that when clicked will call screen B to be loaded, then the two screens will be in the main app? And what happens if there is no widget linking the screens but there is code calling the other screen.
Thanks.
support-octavioMemberHi donij,
> then the two screens will be in the main app?
Right!>And what happens if there is no widget linking the screens but there is code calling the other screen.
In that case you need to add your other .mobi files as additional project files, see attached image in my previous response.
donijMemberHi,
thanks things are clearer now. Unfortunately I can’t view the image. Could you attached it again.
Thank you.
support-octavioMemberAttached image:
See attachment startup_screen_prop.png
See last propertyAttachments:
You must be logged in to view attached files.
donijMemberThanks Octavio,
so from the image if I disable the Startup screen option then it will be included in the main app?
support-octavioMemberHi Donji,
>so from the image if I disable the Startup screen option then it will be included in the main app?
No, what I meant by sharing the image is that you need to add as additional project file the screens that are not linked with a widget but need to be included in the DOM of your app because will be reached by code.
donijMemberHi Octavio,
everything is very clear. I have done that I my work has advanced.
Thanks.
-
AuthorPosts