Mintoris
Apr 28, 2017, 12:44 PM *
Welcome, Guest.

login

register

Did you miss your activation email?


Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem with Back in a List  (Read 175 times)
gianfry56
Full Member
***
Posts: 15


« on: Apr 06, 2017, 07:26 AM »

Hello everyone, this is my first post in this forum Smiley

I have a problem I can not solve, and wonder if anyone has a solution:
I use onBack subroutine to intercept pressing the 'Back' button, and it works; In one case don't work: within a list generated with the 'List' command: in this case the 'Back' pressure is not intercepted by onSub, and the application closes without control.
Is there a solution?

Thanks in advance
(sorry me for my bad english Smiley
Logged
Chuck
Global Moderator
Hero Member
*****
Posts: 1805



« Reply #1 on: Apr 06, 2017, 11:12 AM »

Thanks for reporting this problem. I will release an update in the next few days with the fix
Logged
Chuck
Global Moderator
Hero Member
*****
Posts: 1805



« Reply #2 on: Apr 06, 2017, 11:13 AM »

I just released Basic Version 7.5.9. Once it becomes available and you get it, the back button interrupt will work with all the dialog boxes.
Logged
gianfry56
Full Member
***
Posts: 15


« Reply #3 on: Apr 06, 2017, 11:49 AM »

Wonderful, thank you!
Logged
gianfry56
Full Member
***
Posts: 15


« Reply #4 on: Apr 06, 2017, 01:29 PM »

I'm sorry, but perhaps there is still a problem ...
In this simple code by pressing 'Back' the onBack function is executed (show pop-up) and then regularly return control to the Do ... Loop cycle,
but if, with a tap, I open list and press 'Back' the program crashes (freezes) why?
I wish the control still return to the Do ... Loop cycle, but can not find a solution.   Embarrassed

Code:
Dim menulist$(2) = "First", "Second", "Exit"

SetOnBackButtonSub onBack()

Do
Print FormatTime$(Time(), "hh:mm:ss")
TouchEvent action, idx, x, y, 1000
If action = 0 Then
List menulist$(), choose$
Print choose$
If choose$ = "Exit" Then Exit Do
Endif
Loop

Sub onBack()
Popup "onBack subroutine"
End Sub
Logged
Chuck
Global Moderator
Hero Member
*****
Posts: 1805



« Reply #5 on: Apr 06, 2017, 07:18 PM »

I need to think about this over night. I think the problem is that the list box is being hidden when you press back, then it never gets restored. I don't think I should be hiding the dialog boxes when back is pressed. It should just execute in the background.
Logged
gianfry56
Full Member
***
Posts: 15


« Reply #6 on: Apr 06, 2017, 10:18 PM »

OK, but if the problem is difficult to solve think it's better to return to the previous situation (ver. 7.5.8 ), to be able to still use sub onBack, although it was not perfect.
Good job
« Last Edit: Apr 07, 2017, 09:25 AM by gianfry56 » Logged
Chuck
Global Moderator
Hero Member
*****
Posts: 1805



« Reply #7 on: Apr 07, 2017, 08:58 AM »

It will only take a little while. I have to get it fixed.
Logged
Chuck
Global Moderator
Hero Member
*****
Posts: 1805



« Reply #8 on: Apr 07, 2017, 01:38 PM »

I released 7.5.10. I think it works right now. I wasn't testing it the way you are using it.
Logged
gianfry56
Full Member
***
Posts: 15


« Reply #9 on: Apr 08, 2017, 09:05 AM »

Thanks Chuck. With this new upgrade now it works well.
 Smiley
Logged
gianfry56
Full Member
***
Posts: 15


« Reply #10 on: Apr 08, 2017, 10:08 AM »

Question: when viewing a menu list by pressing Back jump to the subroutine onBack, ok;
Within onBack there is a way to close the list (by code) without selecting anything?
I think not, but I ask the same...
Logged
Chuck
Global Moderator
Hero Member
*****
Posts: 1805



« Reply #11 on: Apr 08, 2017, 03:10 PM »

Well, no. That's kind of why I had it dismiss the dialog boxes in the first release.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.028 seconds with 17 queries.