For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 21 replies, 3 voices, and was last updated 12 years, 1 month ago by
Code_A.
-
AuthorPosts
-
January 24, 2014 at 3:27 pm #346364
Code_AMember@philippnm wrote:
Note: I’ve also seen phoneui.gotoPage to switch pages. Is this the same as phoneui.gotoScreen?
The gotoPage call is used in conjunction with the multipage widget where all the “pages” are stores internally to one .mobi file. The gotoScreen call is used to load a page that exists externally in a separate .mobi file.
See the widget reference for more info on the On Click Actions.
January 24, 2014 at 7:40 pm #346374
NikolayMantchevMemberHey CodeA I’m having a bit more trouble:
I need to transition from page to page with phoneui.gotoScreen. My code is attached as a .txt file.As you can see, It is pretty solid in that it checks each variable to see if it is higher than the others, then goes to a different page. My problem is that it doesn’t actually work. The names of the pages are spot on, I have added them as additional files, and when I built it into an Android App to test on the actual tablet, I made DOUBLE SURE to add all the extra pages under the “Data and Files” tab. Do I need to add or remove #m1- or just m1- in front of the page names? Am I doing something wrong?
Your support is well appreciated.
Edit: If there is anywhere I can contact you quickly, where would that be?
Attachments:
You must be logged in to view attached files.January 25, 2014 at 5:05 am #346382
Code_AMemberI have not used gotoScreen much as I mostly setup MultiPage environments using the MultiPage container widget, but I will try to assist you…
You should not have to put the ‘#’ in front of the call. For example, either call below should result in the same thing:
phoneui.gotoScreen('m1-page', phoneui.transitions.fade); phoneui.gotoScreen('m1-page', 'FADE');Have you added the additional screens (.mobi files) to your main screen in the project files area?
Attachments:
You must be logged in to view attached files.January 25, 2014 at 6:30 am #346383
NikolayMantchevMemberCodeA, I have indeed added all of my extra screens (There are a few, as you can see) to the additional project files. I have tried both with and without the # in the call, and they still have not worked. I have debugged the massive ‘if’ statement (which has multiple elseifs) and it works like a charm, but for some reason, it just will not change screens. In any case, is there a limit on the names of each .mobi file? Should there be no caps in the name of a .mobi or something along those lines? Thanks for your help.
January 25, 2014 at 6:52 am #346384
Code_AMemberWhat are the names of your .mobi files that you are using as the other screens?
I have attached an example of moving between screens through JS. Not sure if it will help or not.
To debug, try commenting out all of the logic and just leave the “gotoScreen” call active to isolate that code. If it works, then you know there is a syntax error in the commented out logic.
Hope this helps!
Attachments:
You must be logged in to view attached files.January 25, 2014 at 7:03 am #346385
NikolayMantchevMemberThe names of my .mobi files were fairly long, with capital letters (Analytical-Results.mobi, Analytical-Creative.mobi, etc.) and I’m not sure if the length or capitals impacted the gotoScreen. I have commented out all of my gotoScreens and found that my logic works perfectly (thanks again for that), but upon commenting out the logic, i found that the gotoScreens still don’t work. I will try now with no capitals, but the same names to see if that works. If all else fails, I will use a multiPage, but I’m completely unfamiliar with it.
Thanks for your help.January 25, 2014 at 7:21 am #346386
Code_AMemberIf you continue to have trouble, try creating a stripped down generic version of your app and see if you can get it working. If you still can’t get it to change screens, then you can upload that project here for support.
-
AuthorPosts
