1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

calling a method

Discussion in 'Development' started by Masternoob, Feb 16, 2012.

  1. Masternoob

    Masternoob Member

    Is there a way that i can make a method available in my whole program?

    i wrote a test class with a method and i want to use it in my programm without having to do this before every call:
    Code (progress):
    1. definine variable xxx as class class.yyy no-undo.
    2. xxx = NEW class.yyy
    thx for your help
  2. KleineCuypie

    KleineCuypie New Member

    You can make a static method. Then you don't have to initiate the class and directly go to your method by using.
    Code (progress):
    2. class.yyy:yourMethod().
    5. CLASS class.yyy:
    8. METHOD PUBLIC STATIC VOID yourMethod():
    9. END METHOD.
  3. Masternoob

    Masternoob Member

    thank you!
  4. tamhas

    tamhas ProgressTalk.com Sponsor

    WARNING! Use statics with care. Once the class is referenced, it is in memory until the session is over. No way to remove it. There are many unpleasant side effects. Only make something static when you are really, really sure that is the right thing to do.
Similar Threads
Forum Title Date
Development OOABL, Calling methods with ABL functions. May 13, 2014
Development Does OpenEdge Support Calling Web Services Using RESTful Method Apr 2, 2013
Development calling methods Jul 30, 2009
Development trouble calling activex method Aug 13, 2007
Development Calling Axis WebService Methods from Progress 9.1C Mar 16, 2004

Share This Page