calling a method

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:
definine variable xxx as class class.yyy no-undo.
xxx = NEW class.yyy

thx for your help
 

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:
class.yyy:yourMethod().


CLASS class.yyy:


METHOD PUBLIC STATIC VOID yourMethod():
END METHOD.
 

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.
 
Top