aLEX,
>This time it's questions. Pardon the basic level, but I am new to VFP.
I'm glad to help out.
>1) bOptionGroup::Init() can be replaced by DODEFAULT(), right?
Yes. This class was developed before dodefault() existed.
>2) Confirm these guesses please:
>2.1) Because the option group is not a container that contains the labels, you need to save the "fully qualified path" to the option group and to the option associated with each label in a property of the label. Is there a reason why you save a char string with the "fully qualified" object names instead of a reference to the objects themselves?
I use a
character name reference is stored instead of an
object pointer reference to prevent any problems with dangling object references. In this case since the "reference" isn't used very often it doesn't need to be "high performance" so doing the two evals is a good tradeoff compared to the problems of dangling refs.
>2.2) The mc stands for my character property.
MemberCharacter. It comes from my use of VC++ which used that convention for it's member properties of a class.
>> .mcSetValue = left( oButton.Caption, 1 ) && The hot key that this label must send to the option group
>> .mcOptionGroupName = "this.parent." + oOptionGroup.Name && Fullpath to OptionGroup.
>> .mcButtonName = .mcOptionGroupName + "." + oButton.Name && Fullpath to associated Option Button.