Image Caching and How to Stop It

42 views
Skip to first unread message

Steve Burrows

unread,
Jul 25, 2025, 7:35:05 AMJul 25
to Migrated By Firefly
I have a table that stores image file names, and a Browse Form on the table that displays the image.
Once the program has displayed the image, it appears to be cached (changes to the physical file are ignored) until the program/context is close/reopended.
Moving between records does not re-read the physical image file.
A Raise(Command.RefreshDisplayedData) doesnt have any effect.

Any way to force a re-read (preferably), or disable the cache entirely ?

Steve Burrows

unread,
Jul 29, 2025, 8:29:43 AMJul 29
to Migrated By Firefly
Cant really raise as a bug as XPA is even worse. You have to exit the Application to clear the cache.
Still would be nice to have a way of refreshing an Image, or a property to disable the helper for a particular image control

Harry Kleinsmit

unread,
Jul 29, 2025, 11:09:53 AMJul 29
to Migrated By Firefly
Hi Steve,

In the controller you could add <YourImageControleName>.ReloadImage() at some control or event.

I've used this for my help screen that makes a screen capture (to send by mail to our help desk). A button opens paint and you can change the image there, like circle the problem item, and after closing Paint I do this ReloadImage(). Works fine for me. It show the just adjuste picture on the screen immediately.

Sample: 
In the controller for the button:
     private void btnB_EditScreenCapture_Click(object sender, ButtonClickEventArgs e)
     {
         _controller.EditScreenCaptureBitmap();
         picScreenCaptureBitmap.ReloadImage();
    }
In the program:
            internal void EditScreenCaptureBitmap()
            {
                if (u.FileExist(v_ScreenCaptureBitmapPath))
                {
                    ENV.Windows.OSCommand(@"""" + _parent.v_MsPaintPath.Trim() + @""" """ + v_ScreenCaptureBitmapPath.Trim() + @"""", true);
                    Raise(KASME.Application.PositionOnField, "i_ProblemDescription");
                }
            }

So I'm als using a u.CtrlGoto() on the last line (Raise).

Best regards,
Harry Kleinsmit.

Op dinsdag 29 juli 2025 om 14:29:43 UTC+2 schreef steven....@gmail.com:

Noam Honig

unread,
Jul 31, 2025, 1:35:33 AMJul 31
to Harry Kleinsmit, Migrated By Firefly
Thanks Harry - great answer.

Steve, did this answer your question?

Noam Honig  
Founder & CEO


--
You received this message because you are subscribed to the Google Groups "Migrated By Firefly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to migrated-by-fir...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/migrated-by-firefly/379f1864-23f9-424c-bc17-1af247ee6827n%40googlegroups.com.

Steve Burrows

unread,
Jul 31, 2025, 3:11:27 AMJul 31
to Noam Honig, Harry Kleinsmit, Migrated By Firefly
Thanks very much Harry, glad to see that ReloadImage will do the job if I can find a way to trigger it so there is something worth persuing.

However, the change of the file occurs in a MonitorValueChanged in the UIController, so I dont have visibility of the picture control in the view. 
I may be able to :
  1. not use an anonymous view and pop it in a property (View = () => myView = new Views.TheView(this);
  2. create a public method in the View to refresh (public void redo() => pic.ReloadImage();)
  3. invoke that but from the MonitorValueChange (myView.redo();)
A quick test seems OK, but feels psycoticly recursive. Is this good practise, or is there a simpler way to invoke a method in an anonimous View ?

Noam Honig

unread,
Jul 31, 2025, 5:03:40 AMJul 31
to Steve Burrows, Harry Kleinsmit, Migrated By Firefly
You can from the view register also to the value change of the column in the controller


Noam Honig  
Founder & CEO
Reply all
Reply to author
Forward
0 new messages