facebook

Fake Screen Dial for Iphone 4

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    newapp
    Member

    Hi
    I am new to making apps

    I know some programming but nothing fancy.

    I am trying to make a very simply app, is just a fake screen that pretends to dial someone.

    This is what I have done so far:

    What i would like to do is to put an INPUT screen on the top (circled in red) where if someone pushed the number 1 button it would be displayed on.

    If someone could give me some help, I would really appreciate it !

    thanks

    NL

    #330222

    Hi,

    I have not forgotten you 🙂 Things have been a little overwhelmed lately. I’ll follow up with you later today with a few advices.

    #330258

    newapp
    Member

    Thanks a lot !
    I appreciate it.
    Ok I will wait 🙂

    Thanks

    NL

    #330275

    Hi,

    I will need one day more to check a few things with dev team and give you the best advice 🙂

    #330284

    newapp
    Member

    Ok
    Thanks for not forgetting 🙂

    NL

    #330307

    Hi

    You can create a function like next one:

    addDigit(num) {
    
      var inputField = $('#m1-AppName-text1');
      $(inputField).val(inputField.val() + num);
    }

    Then set the on click action for each button:

    Button1: addDigit(“1”)
    Button2: addDigit(“2”)
    Button3: addDigit(“3”)

    Button9: addDigit(“9”)

    Don’t foget to add the Text Field widget ( inputField) where the numbers will be added.

    Let us know how it goes.

    #330309

    newapp
    Member

    So,
    here is what I did :

    I added a text field which id is: textField1
    The name of the app is : app

    Then on the Actions option of the text field I selected On Change Run Java Script you gave me, I just adapted it according with the id of the textField and the name of the app

    And I placed this code as the java script:

    addDigit(num) {

    var inputField = $(‘#m1-App-textField1’);
    $(inputField).val(inputField.val() + num);
    }

    You can see it better in this picture:

    I also made sure to put the script on Click on each one of the numbers (0 to 9) like:

    addDigit(“1”)
    addDigit(“2”)
    etc

    Here is the picture about that:

    That is what I have done, but it does not work. What am I doing wrong.

    Thanks in advance for your help

    NL

    #330323

    Hi,

    Your function should be in your custom.js file. Please try it and let us know how it goes.

    #330331

    newapp
    Member

    I created a JS file and placed it in the folder, but nope 🙁
    it did not work

    NL

    #330333

    Hi,

    Could you attach your custom.js file to review it and see what is wrong?

    #330361

    newapp
    Member

    I have attached all the files
    thanks a lot by the way for your support and help

    NL

    Attachments:
    You must be logged in to view attached files.
    #330363

    support-michael
    Keymaster

    Notice in your project there is a file www/app_custom.js. This file was generated by MobiOne and is intended where you add your custom javascript code. The file is named with the pattern <project-name>_custom.js. You can find more details here:
    http://www.genuitec.com/mobile/docs/workingWithGeneratedFiles/workingWithGeneratedFiles.html#editing_javascript

    #330366

    newapp
    Member

    ok
    I just did that
    but
    ehmm
    🙁
    Nope 🙁
    It still doesn’t work

    NL

    #330367

    support-michael
    Keymaster

    So investigated the code you sent and the addDigit() function had a couple of errors. Here is the version I implemented and tested. The function uses jquery extensively and I added it in the app_custom.js file.

     
    function addDigit(num) {
      var textField1 = $('[name=textField1]');
      $(textField1).val(textField1.val() + num);
    }​
    
Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Fake Screen Dial for Iphone 4

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