>Send to VFPfeed status:
>Never it will not be sended.
What does this mean? You are not sending these reports to the Visual FoxPro 9 beta report system?
Yes.
>Subject:
>A Protected Object does not allow directed use of one its property in its ControlSource.
Why, if the property is protected do you think SetAll() should magically change how it works? Whether you use SetAll() or just property= , you can't set a protected property unless it is a member of the object your code is in.
BOb
Nothing of magical must happen, SetAll must respect the protected objects.
Focus attention on point 1 and 2
Point 1 : oForm.setAll('Tag','CIAO')
....
PROCEDURE click
Point 2 : this.setAll('Tag','CIAO')
endproc
On Point 1 and Point 2 VFP use two C++ different programs.
Point 1 program:
- recurse into the objects tree, and skip protected object ( this is correct )
Point 2 program:
- recurse into the objects tree,
without skip the protected objects ( this is the bug )
If you declare
PUBLIC oForm
CLEAR
ON ERROR ? MESSAGE()+" this is a Bug, no error must happen"
oForm=CREATEOBJECT('myForm')
oForm.Show
oForm.setAll('Tag','CIAO')
? 'end start'
oForm.Click
DEFINE CLASS myForm AS Form
AllowOutput = .F.
AutoCenter = .T.
ADD OBJECT MYCONTROL AS MYCONTROL
PROCEDURE click
this.setAll('Tag','CIAO')
endproc
ENDDEFINE
DEFINE CLASS MYCONTROL AS Container
ADD OBJECT PROTECTED myTextBox1 AS myTextBox
ENDDEFINE
DEFINE CLASS myTextBox AS TextBox
PROTECTED Tag
ENDDEFINE
the error does not happen.
This show because the error happen,
VFP C++ code read the property Tag ( if it is protected then it is skipped ),
after it call a C++ routine for apply the SetAll value to myTextBox1.Tag,
but this routine skip the objects protected,
and then fire a not found object error.
Because the error stop the SetAll process,
if you have a protected object or a "Control class" into the objects tree,
the SetAll is not usable.
Fabio