B4A Library [Lib] BetterDialogs

JakeBullet70

Well-Known Member
Licensed User
Longtime User
First of all, really love this lib.

I have used it before without a problem but on one of my new projects the whole application just terminates.
I turned off the filter in the logs and got this:

---------------------------------------------------------------------------------------
Window 'Window{529d7ca4 u0 sadLogic.weather/sadLogic.weather.setup}' spent 14885.0ms processing the last input event: KeyEvent(action=0, deviceId=1, source=0x00000301)
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@52957b74 attribute=null, token = android.os.BinderProxy@5299cdd0
Main:Keycode:49
eglSurfaceAttrib not implemented
out_write() limiting sleep time 44149 to 23219
out_write() limiting sleep time 35759 to 23219
out_write() limiting sleep time 27369 to 23219
DR=-2
no
Window 'Window{529d7ca4 u0 sadLogic.weather/sadLogic.weather.setup}' spent 3159.3ms processing the last input event: KeyEvent(action=0, deviceId=1, source=0x00000301)
Fatal signal 11 (SIGSEGV) at 0x00770065 (code=1), thread 15335 (adLogic.weather)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'generic/vbox86tp/vbox86tp:4.3/JLS36G/eng.buildbot.20131113.013156:userdebug/test-keys'
Revision: '0'
pid: 15335, tid: 15335, name: adLogic.weather >>> sadLogic.weather <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00770065
eax 00770065 ebx b7195e4c ecx b830af74 edx b830af68
esi b81100b8 edi 00000000
xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
eip b7188ddf ebp b8110070 esp bfaffe50 flags 00210206
---------------------------------------------------------------------------------------


My code that makes the call is:
B4X:
Private Sub LocationDelete

    '--- delete
    Dim DR As Int
    DR = BD.Msgbox("Question","Delete this location?","Yes", "", "No", Null)
    Log("DR=" & DR)
   
    If DR = -1 Then
        '--- they want to delete
        Log("yes")
    Else
        '--- cancel
        Log("no")
    End If

End Sub

Am I missing something here? I don't quite understand why its terminating the whole program.

Any help would really be appreciated.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
I really have no idea of what's going on. Where this function is called from? You cannot call a MsgBox directly from some events. Try to calling it with CallSubDelayed instead.

CallSubDelayed worked!!!

I am calling it from Activity_KeyPress, I changed my call to this: CallSubDelayed(Me,"LocationDelete")
Thank you so much for your help!!!
 

uhzeg

Member
Licensed User
Longtime User
Hi all
Is there any possibility to highlight the (user) selected item of a listview within CustomDialog ?

Or maybe even react on a user click event on the listview?

Thanks in advance...
 
Last edited:

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Hi all

I am trying to get a seekbar to work, I see one in the sample code but I cannot get it to fire the the event.
I have declared it above: Private SeekBar1 As SeekBar
And added the event: SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)

Is there a trick to this? Or did I miss something?

thanks!
 

Informatix

Expert
Licensed User
Longtime User
Indeed, you cannot get the event of the seekbar. In a dialog, it's not very annoying because the goal is to set a value then click on OK but I understand your concern: you can try another library like this one; depending on the method used to get the events, it might work.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…