KingCubicle
New Member
Hello,
I'm having some trouble getting changes made to static methods to 'show up' in progress. Check out the following sample code.
Snip A:
Snip B:
Snip C:
Now, Snip A was my first attempt at creating the message. The output when running it through Snip C was, predictably, "test message". After making the change to the class to make it look like Snip B, I ran the same code through Snip C. The output was "test message", sans exclamation points. I don't fully understand why this is happening.
My coworker helped me to resolve the issue by having me log out and log back into the dev environment, which makes sense, since static methods are loaded into memory....? I guess my question is how do I force a new version of the static method into memory? I'd like to be able to push class code without having to restart the application to get changes to static methods to take effect.
An interesting aside - if I somehow change the definition of the class (as in Snip D), my changes to static methods DO take effect.
I'm having some trouble getting changes made to static methods to 'show up' in progress. Check out the following sample code.
Snip A:
Code:
CLASS testClass:
METHOD PUBLIC STATIC VOID testMethod():
MESSAGE 'test message' VIEW-AS ALERT-BOX.
END METHOD.
END CLASS.
Snip B:
Code:
CLASS testClass:
METHOD PUBLIC STATIC VOID testMethod():
MESSAGE 'test message!!!!' VIEW-AS ALERT-BOX.
END METHOD.
END CLASS.
Snip C:
Code:
testClass:testMethod().
Now, Snip A was my first attempt at creating the message. The output when running it through Snip C was, predictably, "test message". After making the change to the class to make it look like Snip B, I ran the same code through Snip C. The output was "test message", sans exclamation points. I don't fully understand why this is happening.
My coworker helped me to resolve the issue by having me log out and log back into the dev environment, which makes sense, since static methods are loaded into memory....? I guess my question is how do I force a new version of the static method into memory? I'd like to be able to push class code without having to restart the application to get changes to static methods to take effect.
An interesting aside - if I somehow change the definition of the class (as in Snip D), my changes to static methods DO take effect.
Code:
CLASS testClass:
METHOD PUBLIC STATIC VOID testMethod():
MESSAGE 'test message!!!!' VIEW-AS ALERT-BOX.
END METHOD.
METHOD PUBLIC STATIC VOID dummyMethod():
END METHOD.
END CLASS.