facebook

Stopwatch?

  1. MobiOne Archive
  2.  > 
  3. Examples, HOW-TOs
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #347210 Reply

    falloffalot
    Member

    Ok, so I have managed to figure out how to create a stopwatch in Mobi1 using JS (JavaScript) a very basic script for test purposes.

    My only problem now is the delay!
    When I run the test and use it on my iPhone there is half a second delay when pressing the stop & start buttons.
    Is this a common issue and if so what is the fix?

    #347227 Reply

    Brandon
    Member

    There should not be any delay depending on how you are calling the stop watch.

    Here is a sample (I cant post attachments in this section): http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=6915

    #347237 Reply

    falloffalot
    Member

    Hi Brandon, thanks for the reply.
    I have tidied things up & added lap / split times and the delay has gone, no idea what was causing that!
    My only issue now is when I insert the <HTML> widget into the app and run it using the Mobi1 Web Sim the size gets all messed up.
    As I have used MS Expression Web for many years I am creating my HTML script in that and copy / paste into Mobi1.
    In Expressions my window size is set same as the iPhone screen, any idea what I’m doing wrong? I see your stopwatch uses a mix of JS and widgets / buttons.
    Is this the best method instead all scripting.
    How it looks in Expression

    How it looks in Mobi0ne Web Sim

    #347239 Reply

    Brandon
    Member

    Yes, it uses javascript and widgets only for the interface. This will probably be your best bet in MobiOne as sometimes the HTML from other sites doesnt render correctly. I try to stay away from using html widget as a display for anything that MobiOne has a widget for.

    #347243 Reply

    falloffalot
    Member

    Ok thanks.
    Is there a way of converting or extracting just the JS I need from the HTML?

    #347265 Reply

    Brandon
    Member

    Yes, you should be able to get it out. If its in HTML format the javascript will be in between <script> and </script> tags.
    You will then have to change any code that uses the HTML iptut text boxes to MobiOne text boxes.

    #347266 Reply

    falloffalot
    Member

    Ah thanks, have just been looking at that way.
    Thanks for the speedy response once again, it’s good to know that there is help out there when needed.

    #347269 Reply

    Brandon
    Member

    No problem.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Stopwatch?

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