activate an old form with a signature ?

Author: gerd.vassen@gmx.net (gerdvassen)

hello

I have a lot of 'old' forms executed with the 'run' statement.  I want to use the same forms with the activate statement by adding some parameters.

For example the old call was

 run "FORM"

I want to be able to call the same form with

 activate "FORM".EXEC(param1, param2)

The old run should still be possible as a lot of proc code makes use of it (of course, it would be better to change, but this is not the question :-)).  Is it possible to use the same methods at the same time (without creating intermediate components) ?

thank you for your help !

gerd

 

5 Comments

  1. Hi, maybe a possible solution is create an operation with the same code that execute trigger.

    Regards, Rafa.


    Author: uniface8 (spanish_uniface@hotmail.es)
  2. hello

    That's what I tried before, but got the error -1402 as "edit" is only allowed in the exec trigger.
    I meanwhile tried edit/modal or edit/nonmodal and this seems to work.

     

    Thank you, best greetings

    gerd


    Author: gerdvassen (gerd.vassen@gmx.net)
  3. In operations,

    it has to be edit/modal or edit/nonmodal

     

    Thats all to burn the candle on both ends.

     

    Success, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Why not create a new operation "DOIT"? If there is just a need to have a new signature without any change in code: OPERATION DOIT params string v_PARA1:INOUT string v_PARA2:INOUT endparams IF(1) ; If code is in EXEC acticate $instancename."EXEC"() ELSE ; If code is in a entry called LP_EXEC call LP_EXEC ENDIF RETURN($status) END If there you want to change code also: OPERATION DOIT params string v_PARA1:INOUT string v_PARA2:INOUT endparams call LP_DOIT(v_PARA1,v_PARA2) RETURN($status) END ; ; Without any parameter ; call LP_DOIT("","") EXIT($status) ENTRY LP_DOIT params string v_PARA1:INOUT string v_PARA2:INOUT endparams ... edit/modal ... END So you can call a component by RUN or ACTIVATE But be carefull! If you had called a component by ACTIVATE you cann not call it by RUN anymore (problems with the internal management with instancenames) So sometimes is it necessary to activated a component with ACTIVATE "name"."EXEC"() We solved this by replacing each run by GP_RUN regards Ingo


    Author: istiller (i2stiller@gmx.de)
  5. thank you all for your help, /modal did the trick ...

     

    best greetings,

    gerd


    Author: gerdvassen (gerd.vassen@gmx.net)