The issue is worse than I thought.As a side not, the picture property problem was related to this: This original code did not work:
proc init
lparameters tParam1
dodefault()
WITH THIS AS awFrm OF aw.vcx
.xxx = xxx . . . . . .
.......
.lockscreen=.t.
if pcount() > 0
But it did work when I changed it to the
proc init
lparameters tParam1
dodefault()
if not thisform.wlhtmlgen
with thisform
.xxx = xxx . . . . . .
.......
.lockscreen=.t.
if pcount() > 0
But now I have to deal with ghosting on every other control . That means I now have to manually set in the init every single grid property, every button caption, etc., or it shows as a ghost. what can we do about this? It seems like a pretty big issue for multi-user multi-dataset. It is also a security issue. Rewrtiting every form to never instatitate any properties of any controls except in the .init is not practical.
Why is code in .init being executed during generation if wlhtmlgen = .f.? In this code, should testme() fire?
proc init
dodefault()
if not thisform.wlHTMLgen
testme()
endif
Yes, and I regened just now I see sometimes I get an unexpected "src=Images/" with no file. I am checking into how this is occurring . . . .
just to be sure,
what do you have in src attribute (<img src="?" />), in generated HTML?
That is how I started out. It does not help. before leaving the form I also set the .picture back to ''. I can have NO picture and will still see the previous instance's image/picture.
The problem is systemic. The HTML from the last time the form appeared always flashes initially. In fact even if you do not see it, record the screen display and play it back slowly and you will see it. If the form has enough controls the image stays long enough to be more clearly visible.
It seems to be a caching problem. I can see it in FF 11.0 and IE8 for sure, have not tried other browsers. I have the browser set to always check the page rather than use the cached page. Not sure yet how to gtet around this.
I would suggest to have .Picture = '' when form loads, then assign .Picture in form.init() based on a parameter
This way HTML is generated with no image in control
HTH,
Since forms are really only instatiated once, I have the following problem: on a form I have a logo xxx.jpg. That logo is related to user XXX. Now the user presses the "exit" button, which closes this page and brings him to the home login page. Now user YYY logs in. We "instantiate" the form for him and change the logo to be yyy.jpg.
No matter what, there is always a brief ghost image of the previous logo. No combination of lockscreen or of even resetting the picture property on "exit" helps, not to mention that the user may just use the back button to get back to the login screen and never touch our exit button. I tried code in:
logo init
form init
last method called before form release
and I cannot get rid of the 1 second ghost image.
I experimented with some other forms as tests, and I found that this is pervasive, but if the form hs few enough controls to paint, the ghost can be short enough not to be very noticeable.
The problem is not just images, since the form has to re-init, there is always a delay. Just so happens in my case, with many controls, the ghost is bad, but I only happen to care now about the image control.
Any suggestions appreciated.