Bug? [SOLVED] New PreferencesDialog issues

Discussion in 'Bugs & wishlist' started by Rubsanpe, May 17, 2019 at 3:51 PM.

  1. Rubsanpe

    Rubsanpe Member Licensed User

    I've been trying the new PreferencesDialog option and it works really well. I only have two problems:

    1) When I try to define a size for the dialog the vertical position the dialog takes is too high, leaving a lot of space at the bottom of the screen. Also the title of the dialog is not shown. Steps to reproduce the problem in the original example:
    Code:
    prefdialog.Initialize(Activity"Preferences Dialog"300dip61%y).
    If a height greater than 60% is set and the title is not shown.

    2) For some reason that does not occur in the original example, in a dialog created by me, when opening the dialog, in debug mode there are warnings about not defining the classes of the different controls of the dialog:

    Code:
    Class not found: b4a.example.b4xswitch, trying: com.clarionero.boletinesoficiales.b4xswitch
    Class 
    not found: b4a.example.b4xswitch, trying: com.clarionero.boletinesoficiales.b4xswitch
    Class 
    not found: b4a.example.b4xswitch, trying: com.clarionero.boletinesoficiales.b4xswitch
    Class 
    not found: b4a.example.b4xfloattextfield, trying: com.clarionero.boletinesoficiales.b4xfloattextfield
    Class 
    not found: b4a.example.b4xcombobox, trying: com.clarionero.boletinesoficiales.b4xcombobox
    Class 
    not found: b4a.example.b4xfloattextfield, trying: com.clarionero.boletinesoficiales.b4xfloattextfield
    Class 
    not found: b4a.example.b4xcombobox, trying: com.clarionero.boletinesoficiales.b4xcombobox
    Class 
    not found: b4a.example.b4xfloattextfield, trying: com.clarionero.boletinesoficiales.b4xfloattextfield
    Class 
    not found: b4a.example.b4xcombobox, trying: com.clarionero.boletinesoficiales.b4xcombobox
    Class 
    not found: b4a.example.b4xfloattextfield, trying: com.clarionero.boletinesoficiales.b4xfloattextfield
    Class 
    not found: b4a.example.b4xcombobox, trying: com.clarionero.boletinesoficiales.b4xcombobox
    Class 
    not found: b4a.example.b4xfloattextfield, trying: com.clarionero.boletinesoficiales.b4xfloattextfield
    Class 
    not found: b4a.example.b4xcombobox, trying: com.clarionero.boletinesoficiales.b4xcombobox
    Class 
    not found: b4a.example.b4xswitch, trying: com.clarionero.boletinesoficiales.b4xswitch
    Any idea why they appear in my dialogue and do not appear in the original example?

    3) If the dialog has a date field that is not visible (it is a field that is outside the visible fields), when the calendar is opened, the dialog disappears and when you select a date the dialog reappears but not showing the date field, but showing the dialog from the first field.



    Greetings

    Rubén
     

    Attached Files:

    • 1.png
      1.png
      File size:
      30.2 KB
      Views:
      13
    • 2.png
      2.png
      File size:
      21.8 KB
      Views:
      13
    • 3.png
      3.png
      File size:
      21.5 KB
      Views:
      13
    Last edited: May 17, 2019 at 7:05 PM
  2. DonManfred

    DonManfred Expert Licensed User

    Do not copy the layout files from one app to another. Create a new layout in your app.
     
    mangojack and Peter Simpson like this.
  3. Rubsanpe

    Rubsanpe Member Licensed User

    Hi DonManfred, thanks for answering. The JSon file of the dialog was created from 0 and its content has nothing to do with Erel's example. The code that generates the dialog in B4A is not the same code used by Erel. I have modified the Erel example package from b4a.example to b4a.example2 and now it also shows the warning messages running.

    Code:
    Close the drawers on back key press
    ** 
    Activity (main) Pause, UserClosed = true **
    *** 
    Service (starter) Create ***
    ** 
    Service (starter) Start **
    ** 
    Activity (main) Create, isFirst = true **
    Class 
    not found: b4a.example.b4xfloattextfield, trying: b4a.example2.b4xfloattextfield
    ** 
    Activity (main) Resume **
    Class 
    not found: b4a.example.b4xswitch, trying: b4a.example2.b4xswitch
    Class 
    not found: b4a.example.b4xfloattextfield, trying: b4a.example2.b4xfloattextfield
    Class 
    not found: b4a.example.b4xplusminus, trying: b4a.example2.b4xplusminus
    Class 
    not found: b4a.example.b4xplusminus, trying: b4a.example2.b4xplusminus
    Class 
    not found: b4a.example.b4xcombobox, trying: b4a.example2.b4xcombobox
    Class 
    not found: b4a.example.b4xfloattextfield, trying: b4a.example2.b4xfloattextfield
    Class 
    not found: b4a.example.b4xfloattextfield, trying: b4a.example2.b4xfloattextfield
    Class 
    not found: b4a.example.b4xswitch, trying: b4a.example2.b4xswitch
    ** 
    Service (starter) Destroy (ignored)**
    Regarding the problem with the uses of the calendar field, the same happens with the original example of Erel.

    Greetings

    Ruben
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    2. Ignore the warnings. They will be removed in the next version of B4A.

    1.
    Remember that the keyboard will take quite a lot of space when it appears. The title is hidden by design when there isn't enough space for the keyboard to appear without hiding the dialog (the measurement is not 100% accurate so it adds some "safe" margins).

    How can the calendar open if the field is not visible?
     
  5. Rubsanpe

    Rubsanpe Member Licensed User

    Hey, Erel, thanks for the answers.

    By non-visible fields I am referring to fields that are not visible when opening the dialog and that the dialog must be scrolled in order to be visible. Then when you click on them to select a date, when the calendar closes, the dialog displays the first controls of the dialog again, and not the control over which we just selected the date (image nº 3).

    Rubén
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I'm unable to reproduce it. The list preserves the scroll position.
     
  7. Rubsanpe

    Rubsanpe Member Licensed User

    Thank you Erel. I have uploaded your same example (commenting a single line) using the dialog I try to use. In the test if I try to assign a date field, when it return the first field of the dialog is selected.

    Rubén
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

  9. Rubsanpe

    Rubsanpe Member Licensed User

    Perfect, it's working properly now.

    Greetings.

    Ruben
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice