Hi
We have a Re-usable part called POS_CONN (for connection) which has the following:
Mthroutine Name(uInitialize) Options(*REDEFINE)
* * In the command's uInitialize method routine, set the screen wrapper's uCommand property to #com_owner
Set Com(#POSCONN) uCommand(#com_owner)
Invoke Method(#POSFMAIN.ShowForm)
Endroutine
Mthroutine Name(uExecute) Options(*REDEFINE)
Invoke Method(#Com_Ancestor.uExecute)
Invoke Method(#POSCONN.MakeRampTSAvailable)
Endroutine
Evtroutine Handling(#POSCONN.RampTSAvailable)
Invoke Method(#POSCONN.NavigateToScreen) Name('HN2000')
Endroutine
Evtroutine Handling(#POSCONN.vHandleArrive) ArrivedScreen(#CurrentScreen) PreviousScreen(#PreviousScreen) ArrivedPayload(#Payload)
Define Field(#debNr) Reffld(#DEB)
Define Field(#salesNr) Reffld(#VMAN)
Case (#CurrentScreen)
When Value_Is(= 'HN2000')
Message Msgtxt('At HN2000')
When Value_Is(= 'DB0100LS_OptionCL')
Message Msgtxt('At DB0100LS_OptionCL')
Endcase
Endroutine
How would I go about Navigating to another screen from a different Re-usable part, lets say when Enter is pressed on an edit field on a different Re-usable part?
Ive tried creating a method routine:
Mthroutine Name(HN2000)
#POSCONN.NavigateToScreen Name('DB0100LS_OptionCL')
Endroutine
and then calling that method routine on the other re-usable part:
#POS_CONN.HN2000 or Invoke method(#POS_CONN.HN2000)
But based on the message and the trace, it does not navigate at all. Can someone provide some guidance please and thank you.
Navigating RAMP through different Re-usable Parts
Re: Navigating RAMP through different Re-usable Parts
Hi
You may need to post here what is that posscon reusable part doing.
Is that using axes robot?
What other methods and events do you have there?
You may need to post here what is that posscon reusable part doing.
Is that using axes robot?
What other methods and events do you have there?
Re: Navigating RAMP through different Re-usable Parts
Here is my full code of POS_CONN if that helps..
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #VF_AC010) Height(270) Width(500)
Define_Com Class(#vf_sy122) Name(#POSCONN) Parent(#COM_OWNER) Visible(False)
Define_Com Class(#POSFMAIN) Name(#POSFMAIN)
Define_Com Class(#POS_RP_SALEDEB) Name(#POS_RP_SALEDEB)
* Define_Com Class(#POS_SKUF) Name(#POS_SKUF)
Define_Com Class(#POS_AUTH) Name(#POS_AUTH)
Mthroutine Name(uInitialize) Options(*REDEFINE)
* * In the command's uInitialize method routine, set the screen wrapper's uCommand property to #com_owner
Set Com(#POSCONN) uCommand(#com_owner)
Invoke Method(#POSFMAIN.ShowForm)
Endroutine
Mthroutine Name(uExecute) Options(*REDEFINE)
Invoke Method(#Com_Ancestor.uExecute)
Invoke Method(#POSCONN.MakeRampTSAvailable)
Endroutine
Evtroutine Handling(#POSCONN.RampTSAvailable)
Invoke Method(#POSCONN.NavigateToScreen) Name('ALG0015')
Endroutine
Evtroutine Handling(#POSCONN.vHandleArrive) ArrivedScreen(#CurrentScreen) PreviousScreen(#PreviousScreen) ArrivedPayload(#Payload)
Define Field(#debNr) Reffld(#DEB)
Define Field(#salesNr) Reffld(#VMAN)
Case (#CurrentScreen)
When Value_Is(= 'ALG0015')
If Cond((#COMPCODE = 0) *And (#BRCHCODE = 0))
Dountil Cond(#POS_AUTH.IsRealized = True)
Invoke Method(#POS_AUTH.ShowForm)
Enduntil
Endif
When Value_Is(= 'HN2000')
Message Msgtxt('At HN2000')
When Value_Is(= 'DB0100LS_OptionCL')
Message Msgtxt('At DB0100LS_OptionCL')
Endcase
Endroutine
Evtroutine Handling(#POSFMAIN.DetailSet)
If Cond(#POSFMAIN.HN2000Det( #VMAN #DEB ) = 'Y')
#POSFMAIN.HN2000Det( #VMAN #DEB )
Endif
* Use Builtin(MESSAGE_BOX_ADD) With_Args('Traveller')
* Use Builtin(MESSAGE_BOX_SHOW)
Endroutine
Mthroutine Name(HN2000)
#POSCONN.NavigateToScreen Name('DB0100LS_OptionCL')
Endroutine
End_Com
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #VF_AC010) Height(270) Width(500)
Define_Com Class(#vf_sy122) Name(#POSCONN) Parent(#COM_OWNER) Visible(False)
Define_Com Class(#POSFMAIN) Name(#POSFMAIN)
Define_Com Class(#POS_RP_SALEDEB) Name(#POS_RP_SALEDEB)
* Define_Com Class(#POS_SKUF) Name(#POS_SKUF)
Define_Com Class(#POS_AUTH) Name(#POS_AUTH)
Mthroutine Name(uInitialize) Options(*REDEFINE)
* * In the command's uInitialize method routine, set the screen wrapper's uCommand property to #com_owner
Set Com(#POSCONN) uCommand(#com_owner)
Invoke Method(#POSFMAIN.ShowForm)
Endroutine
Mthroutine Name(uExecute) Options(*REDEFINE)
Invoke Method(#Com_Ancestor.uExecute)
Invoke Method(#POSCONN.MakeRampTSAvailable)
Endroutine
Evtroutine Handling(#POSCONN.RampTSAvailable)
Invoke Method(#POSCONN.NavigateToScreen) Name('ALG0015')
Endroutine
Evtroutine Handling(#POSCONN.vHandleArrive) ArrivedScreen(#CurrentScreen) PreviousScreen(#PreviousScreen) ArrivedPayload(#Payload)
Define Field(#debNr) Reffld(#DEB)
Define Field(#salesNr) Reffld(#VMAN)
Case (#CurrentScreen)
When Value_Is(= 'ALG0015')
If Cond((#COMPCODE = 0) *And (#BRCHCODE = 0))
Dountil Cond(#POS_AUTH.IsRealized = True)
Invoke Method(#POS_AUTH.ShowForm)
Enduntil
Endif
When Value_Is(= 'HN2000')
Message Msgtxt('At HN2000')
When Value_Is(= 'DB0100LS_OptionCL')
Message Msgtxt('At DB0100LS_OptionCL')
Endcase
Endroutine
Evtroutine Handling(#POSFMAIN.DetailSet)
If Cond(#POSFMAIN.HN2000Det( #VMAN #DEB ) = 'Y')
#POSFMAIN.HN2000Det( #VMAN #DEB )
Endif
* Use Builtin(MESSAGE_BOX_ADD) With_Args('Traveller')
* Use Builtin(MESSAGE_BOX_SHOW)
Endroutine
Mthroutine Name(HN2000)
#POSCONN.NavigateToScreen Name('DB0100LS_OptionCL')
Endroutine
End_Com
Re: Navigating RAMP through different Re-usable Parts
Hi
Looks like you are using
What is called
Screen wrappers
In vlf-win
Documentation is here:
https://docs.lansa.com/15/en/lansa050/i ... s%7C_____0
You basically have to
Listen to the events after
Navigate to a destination
Evtroutine Handling(#myscreen_wrapper.vHandleArrive) Arrivedscreen(#CurrentScreen) Previousscreen(#PreviousScreen) Arrivedpayload(#Payload)
Look this example
https://docs.lansa.com/15/en/lansa050/i ... f153693692
Looks like you are using
What is called
Screen wrappers
In vlf-win
Documentation is here:
https://docs.lansa.com/15/en/lansa050/i ... s%7C_____0
You basically have to
Listen to the events after
Navigate to a destination
Evtroutine Handling(#myscreen_wrapper.vHandleArrive) Arrivedscreen(#CurrentScreen) Previousscreen(#PreviousScreen) Arrivedpayload(#Payload)
Look this example
https://docs.lansa.com/15/en/lansa050/i ... f153693692