Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8101877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:05:45+00:00 2026-06-05T23:05:45+00:00

I’m working with Progress 10.1c I have a class that contains both static and

  • 0

I’m working with Progress 10.1c

I have a class that contains both static and non-static methods.

The class is defined with USE-WIDGET-POOL. In the destructor I say “DELETE WIDGET-POOL”.

I create an instance of my class, and call a method. The method itself uses one of the static methods of the class. So if I understand it correctly, I will now have the instance of my class in its own unnamed pool, and a separate unnamed widget pool for the static members of the class.

So far so good. But I’m busy debugging and I’m making changes to the code. I recompile and run my test again. Now my non-static members work, but all the static members come from the older version of my class, that is still stored in the pool for static members, which is scoped to the session. In other words, the “DELETE WIDGET-POOL” in my destructor deleted the pool for the instance of the class, but the pool for the static members is still there.

The only way I can get it to load the new version of my class is to log off my session, and log on again. This is quite a mission in our environment. Every time I make a change, I have to stop and start my development environment.

I tried to walk the list of objects in my session, but could not find what I’m looking for. There’s a good chance I’m starting at the wrong object, or I’m missing some knowledge of pools and objects in Progress.

Is there any way for me to target that unnamed pool and delete the static “instance” of my class, without destroying my session every time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:05:46+00:00Added an answer on June 5, 2026 at 11:05 pm

    This turned out to be doable with very little coding. I can use the statement DELETE OBJECT THIS-OBJECT to delete the instance executing that statement. So if it’s in a static method, it is the static instance that gets deleted.

    METHOD STATIC VOID Reload () :
        DELETE OBJECT THIS-OBJECT.
    END METHOD.
    

    So now when I have a new version of the class, I just use MyClass:Reload(). No need to end my session.

    Thanks to Tim Kuehn for pointing me in the right direction with his suggestion of using a static method to delete the named widget-pool.


    I have created this example to demonstrate how I got it to work. Below is a simple class with 3 static methods:

    /* File : rtt/cls/demo.cls */
    
    USING Progress.Lang.*.
    ROUTINE-LEVEL ON ERROR UNDO, THROW.
    
    CLASS rtt.cls.demo USE-WIDGET-POOL :
    
        METHOD STATIC CHARACTER SayHello() :
          RETURN "Good-bye".
        END METHOD.
    
        METHOD STATIC VOID ShowMessage() :
          MESSAGE "This is the message." VIEW-AS ALERT-BOX.
        END METHOD.
    
        METHOD STATIC VOID Reload() :
          DELETE OBJECT this-object.
        END METHOD.
    
    END CLASS.
    

    I don’t know how other people’s environments are set up, but in my environment I have to log on to our system to be able to compile and run programs, in other words, I have an active session.

    So I compile the file:

    COMPILE VALUE(SEARCH("rtt/cls/demo.cls")) SAVE.
    

    And then I run the following bit in Procedure Editor to test it:

    USING rtt.cls.*.
    
    demo:ShowMessage().
    MESSAGE demo:SayHello().
    

    When I run this, I get a message box that says “This is the message.”, followed by a message box that says “Good-bye”. Exactly as one would expect.

    But there’s a bug, it’s supposed to say “Hello”, not “Good-Bye”, so I edit my class (I’m only showing the two methods I’m changing:

        METHOD STATIC CHARACTER SayHello() :
          RETURN "Hello".
        END METHOD.
    
        METHOD STATIC VOID ShowMessage() :
          MESSAGE "That was the message." VIEW-AS ALERT-BOX.
        END METHOD.
    

    I save my changes, compile it as before, and I run the test again. What messages do you expect to see? I expect to see “This is the message.” and “Good-bye”, same as before. That’s logical, because there is a hidden widget-pool in my current session, and it has an instance of my class loaded (from my first test). It will keep on using this instance until the instance or the pool is destroyed. So I shut down my development environment, log off and then log on again to start up a new session. So far everything is working exactly as expected.

    Now I run my test again, and sure enough, I get my new version: the messages are “That was the message” and “Hello”.

    But now I’m told to add an exclamation after the word “Hello”. so I change it:

        METHOD STATIC CHARACTER SayHello() :
          RETURN "Hello!".
        END METHOD.
    

    I save it and compile it. When I run the test, obviously I will get the older version that says “Hello” without the exclamation. I have to restart my session again before my changes become active. I really don’t want to do that again. So I change my test as follows:

    USING rtt.cls.*.
    
    demo:Reload().
    
    demo:ShowMessage().
    MESSAGE demo:SayHello().
    

    I run it and voilà, I get my latest changes. I change the message from “That was the message” to “It works!”. I save, compile and run my test. What do I see? I see “It works!”. No more restarting my session between edits. My solution works perfectly for me.

    I tried all sorts of stuff, but I cannot get it to generate the error “Cannot Reference THIS-OBJECT or SUPER from a static member (15071)”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.