This Question is Assumed Answered

1 "correct" answer available (5 pts) 14 "helpful" answers available (3 pts)
1 Replies Last post: Jul 15, 2008 1:26 PM by Kamal

how to avoid the caching of control/objects?

Jul 15, 2008 7:43 AM

Click to view RajivGu's profile Level 6 RajivGu 94 posts since
Apr 2, 2008

Hi All,

I am facing a severe issue of caching in my application.

In my application I am using some controls which are getting

Manipulated dynamically,since this objects(Controls) are
cached ,they are not getting

Updated properly in every part of application.

(For eg. I have a tree control in my application where I can
add ,delete node from command butoon
,context menu same time

I have some dialog which are using this tree for
diplaying and selecting the tree node for certain operation,

My problem is that when ever I add a new node to tree
control, dialogs using this tree control are not getting updated

they display
the same old tree control they don’t show the new node added to tree contol.)

Please help me out to solve this caching issue.

Thanks in advance for any suggestion


Thanks

Rajiv

Click to view Kamal's profile Curl Kamal 149 posts since
Oct 17, 2007
1. Re: how to avoid the caching of control/objects? Jul 15, 2008 1:38 PM
Are you using a custom TreeControl or a custom TreeControlUI? Which API(s) are you using to manipulate the Tree control.

Is it possible that the Tree control in the Dialog is not the same one that you are adding/removing nodes from?

If you resize the dialog in question, or you move another window over it, just to invalidate its client area, do you see the expected result? If yes then it has to do with the TreeControlUi not redrawing itself.

See if detaching and then reattaching the TreeControl fixes your problem? If your TreeControl is in a graphical hierarchy, then you can call temporarily replace it with say a Fill object and then replace the Fill object with your tree control.


let fill:Fill = {Fill}
 
{myTreeControl.replace-with fill}
{fill.replace-with myTreeControl}
 


If this works then this means that the TreeControl is failing to inform the UI that its state has changed.

I am asking these as the information provided is not enough to guess what might be the cause of the problem you are seeing. We will be able to help you much better if you can post some code that demonstrates the problem.

Message was edited by: Kamal