Italian Disattivare animazione pagina usando i moduli b4i

Discussion in 'Italian Forum' started by ken87, Nov 7, 2019 at 5:50 PM.

  1. ken87

    ken87 Active Member Licensed User

    Buonasera,
    Ho provato il progetto che permette di richiamare la pagina all'interno di un modulo allego sotto

    https://www.b4x.com/android/forum/threads/multiple-pages-example.48170/#content

    Il problema che tra una pagina e altra c'e un effetto di transizione che non voglio.
    Idea era di usare i moduli per dividere il lavoro tipo recupero password si occupa solo di quello e poi torna alla pagina principale.

    Come devo procedere?

    Ho provato questo codice
    Code:
    Page1.RootPanel.LoadLayout("Paginalog")
        
    Dim no As NativeObject = NavControl
        no.RunMethod(
    "pushViewController:animated:"Array (Page1, False))
    e va in errore

    Allego il codice del modulo sotto:

    Code:
    'Code module

    Sub Process_Globals
        
    Private pg As Page
        
    Public txtName As TextField '<--- public
        Private btnEnter As Button
    End Sub

    Public Sub Show
        
    If pg.IsInitialized = False Then
          
            pg.Initialize(
    "pg")
          
            pg.RootPanel.LoadLayout(
    "LoginLayout")
        
    End If
        Main.NavControl.ShowPage(pg)
        
    Dim no As NativeObject = Main.NavControl
        no.RunMethod(
    "pushViewController:animated:"Array (pg, False))
    End Sub

    Private Sub txtName_TextChanged (OldText As String, NewText As String)
        btnEnter.Enabled = NewText.Length > 
    0
    End Sub

    Private Sub btnEnter_Click
        pg.ResignFocus
        Page1Module.Show
    End Sub
    rivervo il seguente errore

    Code:
    Application_Start
    Error occurred on line: 
    18 (LoginModule)
    Pushing the same 
    view controller instance more than once is not supported (Page (vc): Login)
    Stack Trace: (
      CoreFoundation       __exceptionPreprocess + 
    171
      libobjc.A.dylib      objc_exception_throw + 
    48
      UIKit                __
    71-[UINavigationController pushViewController:transition:forceImmediate:]_block_invoke + 0
      UIKit                -[UINavigationController pushViewController:animated:] + 
    792
      CoreFoundation       __invoking___ + 
    140
      CoreFoundation       -[NSInvocation invoke] + 
    320
      B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 
    1672
      B4i Example          -[B4INativeObject RunMethod::] + 
    200
      B4i Example          -[b4i_loginmodule _show] + 
    1426
      B4i Example          -[b4i_main _application_start:] + 
    541
     CoreFoundation       __invoking___ + 
    140
     CoreFoundation       -[NSInvocation invoke] + 
    320
     B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 
    1672
     B4i Example          -[B4IShell runMethod:] + 
    401
     B4i Example          -[B4IShell raiseEventImpl:method:args::] + 
    2361
     B4i Example          -[B4IShellBI raiseEvent:
    event:params:] + 1357
     B4i Example          __
    33-[B4I raiseUIEvent:event:params:]_block_invoke + 51
     libdispatch.dylib    _dispatch_call_block_and_release + 
    12
     libdispatch.dylib    _dispatch_client_callout + 
    8
     libdispatch.dylib    _dispatch_main_queue_callback_4CF + 
    1260
     CoreFoundation       __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 
    9
     CoreFoundation       __CFRunLoopRun + 
    2402
     CoreFoundation       CFRunLoopRunSpecific + 
    409
     GraphicsServices     GSEventRunModal + 
    62
     UIKit                UIApplicationMain + 
    159
     B4i Example          main + 
    111
     libdyld.dylib        start + 
    1
    )
    Application_Active
    Cosa sbaglio?
    Grazie mille
     
    Last edited: Nov 7, 2019 at 7:54 PM
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