facebook

xxx_cusom.js not loaded when coming from another page ??

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #318857 Reply

    WiZaxx
    Participant

    This is a weird one.
    I have worked out the code for a calculation page and it works just fine … when I start the app at that page, that’s… ONLY.

    When I navigate to the calc page from the home page, the calculations are not working: just like the calc_custom.js is not loading at all.

    I have installed 1.2.2 hoping the problem was a known one and fixed, but it still there.

    Any pointer, please???

    #318865 Reply

    support-michael
    Keymaster

    @WiZaxx
    When using the Run in Test Center, the Designer will generate code for the current page and the transitive closure of any pages that the current page links to. This is a fancy way of saying that the code generator starts at the current page you are running and generates code for it and any design files that it links to and any files that the children pages link to and so on and so on until all of the linked pages have been traversed. But note that any pages that link to your current page are not known to the code-generator.

    So if you are testing an internal page of your app using Run in Test Center treat any files that are generated as transient and only needed to support testing. These files will be ignored when you click Run in Test Center from the designer on the start page of your app.

    So what I think is happening is that you are testing and modifying transient code generated for an internal page of your app. Instead you should put any custom javascript functionality in the xxx_custom.js file created by running from your startup page.

    I hope this explanation is clear.

    So if you are saying “What the…”, we understand and will be introducing a much more clear project mgmt organization and workflow in the near future.

    #318868 Reply

    WiZaxx
    Participant

    You bet I’m saying “What the…”
    And I will be in TX next week and I can even come and say it in person 🙂

    Let me recap so I make sure I understand.
    TestCenter only knows the current page and how to move around from it; but does not know what to do when in another page. So: to test we must have all the codes into the custom.js of the page we are working on.

    BUT when you put the whole app together, all the custom code must go to the starting (home) page for the app to load it all at the lunching of the app.

    am I really far off?

    #318870 Reply

    WiZaxx
    Participant

    OK
    here is another weird one on the subject…

    I copied my functions from the current page’s custom.js into the home page’s custom.js using the internal editor and all is fine and testing correctly with the Test Center.

    So I copied all to the server and tested the app with the iphone: ERROR… again
    I decided to check the files on the server and noticed that my functions are missing from the custom.js

    I had to use my external editor and copy/paste the functions from the internal editor into the files in the server, now it all works fine …
    so now I say it aloud “WHAT THE….” 🙂

    I checked the local files and there too, my functions are missing. Where the h… are custom functions going?

    #318873 Reply

    support-michael
    Keymaster

    @WiZaxx

    >So I copied all to the server

    For this action did you manually copy the project_export directory content or did you use the File>Export As HTML function. We found a bug in the Export function that was not able to be fixed in time for the 1.2.2 release that will generate a new custom.js file during the export procedure. The workaround is to copy the files from your project_export directory that is created during the Run in Test Center action.

    #318876 Reply

    WiZaxx
    Participant

    Yes, I did just copy the whole set of files from the target directory set in “export as HTML” onto my server.
    I then manually edited the file on the server.

    I have checked the export folder and yes, those files are keeping the customization.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: xxx_cusom.js not loaded when coming from another page ??

You must be logged in to post in the forum log in