Android Question Timer1_Tick Not found

Discussion in 'Android Questions' started by Onirzaa, Jan 16, 2015.

  1. Onirzaa

    Onirzaa New Member

    i cant use timer help me
    getting
    "An error has occurred in sub :
    java.lang.Exception: sub timer_tick was not found,
    Contunie?"
    sorry for my english
    Code:
    Sub Globals
        
    'These global variables will be redeclared each time the activity is created.
        'These variables can only be accessed from this module.

        
    Dim label1 As Label
        
    Dim Timer1 As Timer

    End Sub

    Sub Activity_Create(FirstTime As Boolean)
        
    'Do not forget to load the layout file created with the visual designer. For example:
        Activity.LoadLayout("Layout")
        Timer1.Initialize(
    "Timer",1000)
        Timer1.Enabled = 
    True

    End Sub

    Sub Activity_Resume

    End Sub

    Sub Activity_Pause (UserClosed As Boolean)

    End Sub
    Sub Timer1_Tick
       
        label1.text = 
    "asd"
    End Sub
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You have set the EventName parameter to Timer. Change it to Timer1.
     
  3. DonManfred

    DonManfred Expert Licensed User

    Or change the tick event sub according to your definition
    Code:
    Timer1.Initialize("Timer",1000)
    ' ->
    Sub Timer_Tick
        label1.text = 
    "asd"
    End Sub
     
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