MapInfo Pro Developers User Group

 View Only
  • 1.  MapBasic Dialog issue when displaying numbers in EditText control

    Posted 12-23-2020 20:33
      |   view attached

    I have been seeing some odd results when using the Dialog function in MapBasic.  I see these results in MI v2019.3, but not v2017.

    Within my MapBasic program, I carry out the following:

    1. From the currently selected record, retrieve the contents of the first four fields.

    2. Display the contents within Dialog EditText controls.

    Result: those fields that contain numbers are not displayed properly.  Often the EditText control is blank.  Other times they contain seemingly random text such as "sample" and "&foreground", which indicates to me that the wrong memory location is being referenced.

    To replicate this, see the attachment.  To use this:

    1. Open form_sample.TAB in MapInfo 2019.3.

    2. Select a record from the form_sample table in MapInfo.

    2. Run form_sample.MBX

    The contents of the four fields for the record you have selected will be printed to the Message window.  Also, a Dialog will be opened where the contents should be displayed.

    If you run this in 2017 it works, but in 2019.3 it does not.  The mbx is compiled in v2017 but I have also compiled it in v2019 with the same result.

    If I change my code to add a character (e.g. "A") to the beginning of the number, before displaying it in the Dialog, it works.  Note that I am using a string variable to store the contents.



    ------------------------------
    James Nolet
    Dooley Mitchell & Morrison Pty Ltd
    Mentone, VIC, Australia
    ------------------------------

    Attachment(s)

    zip
    form_sample.zip   2 KB 1 version


  • 2.  RE: MapBasic Dialog issue when displaying numbers in EditText control

    Employee
    Posted 12-28-2020 05:18

    Hi James

    Have you raised this issue with our support? If not, I'd suggest you do.

    I can replicate the issue. I have tried changing the way the program accesses the values from the table but that doesn't seem to make any difference.

    Also, as you state yourself, the values look fine in the Message window but not in the EditText controls. And you are right, adding a letter for example "A" in front of the number seems to make it work.

    Even though they are numbers the table and the application are treating these values as strings so I wonder why the EditText control treats them differently.

    But as I said, pass it onto our support at software.support@precisely.com.

    Thanks



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 3.  RE: MapBasic Dialog issue when displaying numbers in EditText control

    Posted 12-28-2020 07:19

    Hi Peter,

    Thanks for checking this for me.  I thought I must have been doing something wrong or retrieving from a corrupt table before I realised it came down to the EditText control itself.  I'll raise this issue with support as you suggest.



    ------------------------------
    James Nolet
    Dooley Mitchell & Morrison Pty Ltd
    Mentone, VIC, Australia
    ------------------------------



  • 4.  RE: MapBasic Dialog issue when displaying numbers in EditText control
    Best Answer

    Employee
    Posted 12-30-2020 18:41

    Hi James,

    Your support case has been actioned and escalated to the engineering team for further advice.
    Thanks for the feedback - appreciated.

    Kind Regards,



    ------------------------------
    Terry Hunt
    Software Support Analyst
    Precisely
    Sydney, Australia
    ------------------------------
    ------------------------------



  • 5.  RE: MapBasic Dialog issue when displaying numbers in EditText control

    Posted 01-17-2022 12:13
    Hi

    Does anyone know if this issue is resolved in MapBasic v2021? I currently have MapBasic v.2019 (build 58) and MapInfo v2019.3 (build 43) and I stumbled upon this issue in my mapbasic code.


    Best
    Asko Põder

    Estonian Agriculture and Food Board

    ------------------------------
    Asko Poder
    Knowledge Community Shared Account
    ------------------------------



  • 6.  RE: MapBasic Dialog issue when displaying numbers in EditText control

    Employee
    Posted 01-17-2022 16:20

    Hi Asko,

    I can confirm that this item was addressed in v2019.3 (build 45) via the below Issue Number (taken from v2019.3 release notes).

    Please download the latest build and install to correct your issue.

    Kind Regards,



    ------------------------------
    Terry Hunt
    Support Engineer
    Precisely
    Sydney, Australia
    ------------------------------
    ------------------------------