facebook

Milestone Upgrade – Issues with Form Conversion

💡
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 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #333272 Reply

    mreade
    Member

    Support,

    Today, I downloaded and installed Milestone over MobiOne 2.2.3. After start up, I opened and created a back up of each form.

    Prior to upgrading, my forms were set up to perform US-Imperial, or SI-Metric Calculations based up a Combobox called “units” which is placed on the main startup form, let us call “Main.mobi.”

    I had the previous text input field type set to Text, but have since changed that Number with this new upgrade.

    The calculations worked fine before upgrading. Now however, even though the Combobox is set to US-Imperial, the calculations are performed after the “Else” statement, or in Metric format.

    The only thing I changed after converting each form was the field type and nothing else.

    Here is the code i have in the main_custom.js file

    var mode = $('select[name="units"] :selected').text();

    Is there something that i should change with this code after upgrading?

    Thanks in advance.

    Mike

    #333275

    @mreade,

    Could you share your project with us to look deeper? Also please give us a little use case of what steps should we follow to replicate, what is the result expected, and what is the result with problem. Send your zip file to support at genuitec dot com, use title mobi one data from mreade.

    #333290

    mreade
    Member

    Good Morning Octavio,

    I will be sending a ZIP file related to this matter to the support email address.

    Mike

    #333323

    mreade
    Member

    Octavio,

    Did support receive the ZIP file I emailed for review? I am still trying to figure out why the If…Else…Statement will only perform the code after the Else side of the statement and not the If side of the statement.


    @mreade

    #333324

    support-michael
    Keymaster

    >Did support receive the ZIP file I emailed for review?

    Yes, thanks for sending it. I should have some feedback today.

    #333325

    mreade
    Member

    Thanks Wayne

    #333343

    support-michael
    Keymaster

    @mreade

    Finding the problem was quick. Finding the src of the problem was much harder…. 🙁
    The issue is definitely a bug in MobiOne 2.3M1’s code-generator. But is such an odd edge-case I could not easily find it. We already have a fix in place that will be available in 2.3 production version. In the meantime you can either revert back to MobiOne 2.2.3 or make a small change in your code and keep moving forward w/ 2.3M1.

    The change to make is this:

    
       var mode = $('select[name="units"] :selected').val(); //<---- use the selection value instead of its label 
        var mph = "  mph";
        var kph = "  kph";
    
        //Convert input fields from text to numbers
        Number(Throw);
         
        //Calculate math if set to Imperial Mode
        if (mode == "imperial")    //<----
    

    Also if your app needs to reference the units frequently I recommend introducing a function to look up the value and insulate the rest of your code from the UI implementation. Here is an example:

    
    /**
     * returns String, the measurement system "imperial" or "metric"
     * /
    function getUnits() {
      return $('select[name="units"] :selected').val();
    }
    
    and/or 
    
    function isImperialUnits() {
       return getUnits() == "imperial";
    }
    
    function isMetricUnits() {
      return !isImperialUnits();
    }
    
    #333399

    mreade
    Member

    Support (Wayne)

    Thanks for the update on this.

    I have changed the “.text” to “.val” and made reference to the “value” rather than the “label.”

    It seems to work every now and then, and at times, when set to Metric for the calculation, when I return to the combobox on the main form, it has reset to Imperial rather than stay at Metric.

    Hopefully, the next release will solve these issues?

    Rather than go through the forms (code) have so far, I await next release.

    Question:

    Would it be wise to place a metric/imperial combobox on each calculation screen or just the main screeen?

    Thanks in advance,


    @mreade

    #333421

    support-michael
    Keymaster

    >Hopefully, the next release will solve these issues?

    The issue has already been fixed in our dev stream and will be available in the next release.

    #333423

    mreade
    Member

    Many thanks Support (Wayne)

    I’ll await patiently.

    🙂

    #333442

    mreade
    Member

    Support,

    FYI…..

    There “may” be a bug with using the Push widget when returning to a previous screen as well.


    @mreade

    #333448

    @mreade,

    Thanks for sharing that info. Can you give us more details that could help us replicate it? Do you have a sample scenario? I did a basic example with two screens, and couldn’t replicate it

    #333506

    mreade
    Member

    Good Morning Octavio,

    I originally started to create an iOS app with version 2.2.3. The app at this time, consists of the following screens:

    1. Main screen (with combobox for Imperial / metric selection)
    2. Category screen (with links to the individual screens)
    3. A screen for each category with an Item List of several formulas
    4. Finally, an individual calculation screen for each situation.

    Prior to upgrading to 2.3, I set the combobox on the main to screen to either Imperial or Metric, flow through to a calculation screen, then select a push button in the header to return to the categories, and eventually make my way back to the combobox on the main screen.

    After upgrading however, it seems that whenever i select the category push button in the header, the combobox resets from an initial metric selection to an Imperial selection.

    So, for whatever reason, this is changed before i negotiate back to the main screen.

    I am guessing this has something to do with the upgrade to 2.3 that will be corrected when the next software release becomes available.

    Regards,


    @mreade

    #333525

    mreade
    Member

    Support,

    I am still not having much luck with getting the combobox value from the main page on a consistent basis. It seems to work fine if I use the “Back” button in the other pages’ header. However, if i use the “push” bottons in the other pages’ header, then the combobox on the main page changes back to the default, or startup value, rather than the value I selected.

    So for now, I will continue to design the other screens and get them ready for the next update is released that will correct this bug.


    @mreade

    #333532

    Hi,

    Your original problem report indicated an issue that we believe will be fixed in the next MobiOne version. The problem you’re reporting now seems to be related to the original issue. We are working to provide that update as quickly as possible (by EOY or sooner).

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: Milestone Upgrade – Issues with Form Conversion

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