>>>>I have a formclass with code in the Refresh Method of certain objects. To my understanding all refresh methods are called as the final stage of the Init Event. However, in my case this doesn't occur if I instantiate the form with newobject(). It does occur if I call a form (scx) that is completely the formclass (vcx). There's no additional code in the scx. Who can explain this?
>>>>
>>>>This works well:
>>>>
do form mpsjob
>>>>read events
>>>>
>>>>This does not do the refresh as the final stage of the init, not even if I explicitly call it (2nd line):
>>>>
loWindow = newobject( 'viafrm_viajob', 'viajob.vcx' )
>>>>loWindow.refresh()
>>>>loWindow.visible = .t.
>>>
>>>Try
>>>
>>>loWindow.Show()
>>>
>>>instead.
>>
>>Almost the solution. :)
>>
>>This is what helped in my case. Any other combination didn't.
>>
loWindow = newobject( 'viafrm_viajob', 'viajob.vcx' )
>>loWindow.refresh()
>>loWindow.show()
>>loWindow.refresh()
>
>I don't think these two refreshes are needed. Definitely not the first one.
As I wrote: In my case no other combination worked. It's a mystery, but vfp is full of mysteries, isn't it? :)
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.